OnStep
Each combatant is given a special ability named "Competing" at the start of a combat event. Then all special ability scripts named OnStep are run for each combatant whenever that combatant moves. So, if you want to accomplish something for a character whenever his position changes during combat, you should define a Special Ability (using the Special Abilities Editor) named Competing with a script named OnStep.
For Example:
This Hook was initially created to cause enemies of a mummy to flee with fear whenever they got too close to the mummy. The OnStep script did the following each time a combatant moved:
- If the moving combatant had an SA named 'InstillMummyFear' then enemies within a certain range were made to flee in fear.
- If the moving combatant was NOT a mummy then it looked for enemies within a certain range that had the SA named 'InstillMummyFear' and, if one was found, then the moving combatant was made to flee in fear.
The actual mechanics worked a little differently but had the same result.
Parameters
None
Context
Combatant