GetIsDoorActionPossible(object, int)
Determines whether an action can be used on a door.
int GetIsDoorActionPossible( object oTargetDoor, int nDoorAction );
Parameters
oTargetDoor
The door to be checked.
nDoorAction
Description
Returns TRUE if nDoorAction can be performed on oTargetDoor, otherwise FALSE.
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.
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).
Version
1.22
See Also
categories: | Get Data from Creature Functions |
constants: | DOOR_ACTION_* Constants |
author: Tom Cassiotis, editor: Jasperre, additional contributor(s): Jasperre