GetIsDoorActionPossible
Contents |
[edit] GetIsDoorActionPossible(object, int)
Determines whether an action can be used on a door.
int GetIsDoorActionPossible( object oTargetDoor, int nDoorAction );
[edit] Parameters
oTargetDoor
The door to be checked.
nDoorAction
[edit] Description
Returns TRUE if nDoorAction can be performed on oTargetDoor, otherwise FALSE.
[edit] Remarks
This is used by Bioware AI scripts for henchmen to attempt different actions on a door if their masters (PCs) fail to open a door. For example, if the henchmen can cast the spell Knock, the script first checks if GetIsDoorActionPossible(oDoor, DOOR_ACTION_KNOCK) before casting Knock.
DoDoorAction can be used to not disrupt an action queue, normally in a creatures OnBlocked event. Of course, this function will return FALSE if oTargetDoor is not a door.
[edit] Known Bugs
The DOOR_ACTION_KNOCK parameter is limited to knowing the spell, and will not check what the spell file NW_S0_Knock checks (IE the plot flag).
[edit] Version
1.22
[edit] See Also
constants: |
author: Tom Cassiotis, editor: Jasperre, additional contributor(s): Jasperre