On Start Combat
Each combatant is given a special ability named "Competing" at the start of a combat event. Then all special ability scripts named OnStartCombat are run for each combatant. So, if you want to accomplish something for a character at the start of combat, you should define a Special Ability (using the Special Abilities Editor) named Competing with a script named OnStartCombat. The scripts for the combatants are run in 'priority' order with the highest priority combatant being the first. As a default, the party combatants are run before the monster combatants. You can adjust the priority using the PreStartCombat hook described below.
Context
Character
PreStartCombat
By default, each party member is given a priority of 750 and each monster is given a priority of 250. The 'OnStartCombat' hook is called for each combatant in turn, starting with the combatant with the highest priority. The 'PreStartCombat' hook is run for each combatant before the 'OnStartCombat' hooks are run. If the 'PreStartCombat' hook returns a non-empty value then the combatant is assigned that value as its priority. The highest priority combatant will have its OnStartCombat hook run first.
Hook Parameters:
Hook Parameter 5 is the default priority for the combatant.
Context:
Combatant
Character
Class