Can Aim


This hook is called when the player has selected 'AIM' during a PC's turn of combat. If the result of the scripts does not allow AIMing then the options “NEXT”, “PREV”, “MANUAL”, “TARGET”, and “CENTER” are removed, leaving only the “EXIT” option on the AIM menu.


We first call any scripts attached to the Character's Special Abilities and then we call any scripts attached to the Weapon's special abilities. If any script returns a non-empty value then no additional scripts are called. If the value starts with the letter 'N' then any AIM options are suppressed. If the value does not start with 'N' then it is taken to mean that the PC can proceed to AIM.


These scripts can deny all AIMing options by returning an 'N'. But the scripts cannot force the opposite result. They cannot force the display of the AIMing options. There are other tests that take place in addition to these scripts which can deny the PC the options to AIM at a targt.

Parameters

The script has access to two parameters:

Parameter 5 = the type of weapon in the attacker's weapon hand:

Parameter 6 = A delimited list of adjacent enemy combatants. Delimited with vertical bar '|'.


These parameters may be fetched using the $GET_HOOK_PARAM(n) , where n is 5 or 6.

Context


Example of use


This was first implemented to allow the designer to specify if a PC could attack with a ranged weapon when an enemy combatant was immediately adjacent. So the script looked like this:


$IF ($GET_HOOK_PARAMETER(6))

{

$IF($GET_HOOK_PARAMETER(5) == “Bow”) {$RETURN “N”;};

};


You might use these scripts to deny any but Rangers the opportunity to AIM when using an “Adroit Ranger's Syringe”.