Enemies that respond in paticular to a certain attack, but not to others

From OHRRPGCE-Wiki

Jump to: navigation, search
This article does not meet the standard of quality we would like to have. Feel free to revise it and make it better by using the edit link at the top of the page. This tag should be removed when an editor feels it is of high quality.

The reason this article has been marked is: the list of required knowledge, as well as the reference to the community, should have links

The easiest way to have an enemy react in a specific way to a specific attack will require knowledge of the following things:

  • Making enemies and attacks
  • Making attacks chain to each other
  • How elements work
  • How spawning works

Once you understand these things, you are ready to go. The idea is to assign a specific element to the attack in question, and have the enemy react to this attack by spawning a new invisible enemy who will commit the specific action as if it were the original enemy. The invisible enemy will then kill itself. Note that this will require the use of one of the eight elemental bitsets available.

[edit] Implementation

Let us use "element 8" as the proper element to trigger the enemy's reaction. This will most likely mean that we cannot use "element 8" for anything else in the game. First we define three attacks. One is the attack that causes the reaction. This attack should have the bitset "element 8 damage" turned on, and should have its targetting settings made so that the user will be able to target the enemy. The second attack will be the reaction itself. This is, of course, entirely up to the author, and may very well be a lengthy chain of various attacks. However, it is very important that this chain goes at a 100% chaining rate (If you would like to have the reaction only sometimes happen, take care of that with the aiming percentage of the initial attack that causes the reaction). Lastly, we need a 'self-kill' attack that targets the self and sets HP to 0% of current. The second 'reaction' attack should chain to this 'self-kill' attack 100% of the time.

Next we make two enemies. First is the 'responder'. Make him as normal for now. Second is the 'reactionist', so to speak. This enemy should be invisible, untargetable by heroes, and should have the 'reaction' attack. It should also have an unholy amount of speed to ensure that it uses the 'reaction' quickly. Also don't forget to give it at least 1 HP. Everything else about it should probably be zero (especially its rewards). Now set the 'responder' enemy to spawn the 'reactionist' enemy upon being hit by an 'element 8' attack, and you are ready to go! Oh, and don't forget to make sure that someone has the attack that causes the reaction.

[edit] Alternatives

If you are unwilling to give up an element for this purpose, there are some alternatives. The easiest case scenario would be if you knew one of the eight elements would be unavailable in the area where the enemy lives, so that you could use that element for this puposes there and still allow its other purposes in other places. If this is not an option, but you have a stat that is useless for the enemies in the given region (perhaps you do not use the Ctr stat in the area), it may be possible to rig this behavior with an extended chain of attacks. There may be other (difficult) implementation alternatives. I would recommend visiting one of the community sites and asking for help there.

Personal tools