Casting callbacks - WoutProvost/FCNPC-AI GitHub Wiki
Home ▸ Callbacks ▸ Casting callbacks
(npcid, spellid, targetid)
FAI_OnStartCasting
- Description: This callback is called when an NPC starts casting a spell.
- Parameters:
npcid
: The ID of the NPC that is starting to cast.spellid
: The ID of the spell that the NPC is starting to cast.targetid
: The ID of the player, or INVALID_PLAYER_ID if there is none, that the NPC is starting to cast the spell on.- Return values: This callback does not handle returns.
- Notes: This callback is only called when FAI_StartCastingSpell is successfully executed. It is not called when it was not successfully executed.
(npcid, spellid, targetid, bool:castComplete)
FAI_OnStopCasting
- Description: This callback is called when an NPC stops casting a spell. If FAI_OnEncounterStop is called, this callback is called as well.
- Parameters:
npcid
: The ID of the NPC that is stopping to cast.spellid
: The ID of the spell that the NPC is stopping to cast.targetid
: The ID of the player, or INVALID_PLAYER_ID if there is none, that the NPC is stopping to cast the spell on.bool:castComplete
: True if the NPC completed the cast, false if not.- Return values: This callback does not handle returns.