This function can be used to invoke an internal trigger handler. For instance if you are create a new kind of attack and you want the catch_attack_act to fire for some weapon then you need to invoke it manually as would normally done internally in the C code. Similarly if you need to have an attached weapon spell fire, you again need to use this function. The %triggerInvoke() function is a multi-pupose function that implements an interface to all hooked trigger types. Current only the following trigger handlers are supported:
catch_attack_act check_weapon_spell The usage for each is described below:
catch_attack_act:
%triggerInvoke( \ "catch_attack_act", @actor, @target, @object, @damage )
This type can be used to invoke an object's catch_attack_act script. The @actor parameter indicates the mobile that has generated the attack. The @target parameter indicates the mobile target of the attack. The @object parameter denotes the object for which the catch_attack_act should be invoked. The @damage parameter is a bit of a misnomer since it can also be used to indicate success or failure. The general standard is to use a negative value for a miss and 0 or greater for a successful hit dealing the amount of damage defined by @damage. However for missile types (throw, shoot, ...) 0 is used to indicate a miss and a number greater than 0 represents the roll obtained.
check_weapon_spell
%triggerInvoke( \ "check_weapon_spell", @actor, @target, @object )
This type can be used to invoke an object's weaponSpell affect. A weapon spell is defined in the objects attached affects. The @actor parameter indicates the mobile that has generated the attack. The @target parameter indicates the mobile target of the attack. The @object parameter denotes the object for which the weaponSpell should be invoked. |