SetExcludedCombatActions

From GECK
Jump to: navigation, search


A function added by the JIP NVSE Plugin.

Description

Excludes specific combat-AI action types from being performed by the calling actor ref, when in combat.

The function takes a single argument, which is a bitmask composed of up to 27 optional bits (see table below). A bit set to 1 will exclude the associated combat action from being performed.

  • For clarity and convenience, it is recommended to use a Binary Notation for the bitmask argument.

Combat Action Bits

Bit #	Action
-----	------
0	ATTACK_RANGED_EXPLOSIVE
1	ATTACK_RANGED_EXPLOSIVE_FROM_COVER
2	ATTACK_RANGED
3	ATTACK_RANGED_FROM_COVER
4	ATTACK_GRENADE
5	ATTACK_GRENADE_FLUSH_TARGET
6	ATTACK_GRENADE_FROM_COVER
7	ATTACK_MELEE
8	ATTACK_HAND_TO_HAND
9	MOVE
10	MOVE_AND_SWITCH_TO_MELEE
11	MOVE_AND_ATTACK_RANGED
12	MOVE_AND_ATTACK_RANGED_EXPLOSIVE
13	MOVE_AND_ATTACK_GRENADE
14	DRAW_WEAPON
15	SWITCH_WEAPON
16	AVOID_THREAT
17	SEARCH
18	INVESTIGATE
19	DODGE
20	IGNORE_BLOCKED_TARGET
21	FLEE
22	ACTIVATE_COMBAT_ITEM
23	USE_COMBAT_ITEM
24	ACQUIRE_LINE_OF_SIGHT
25	HIDE
26	APPROACH_TARGET

Syntax

[help]
actorRef.SetExcludedCombatActions excludeMask:int

Example

VeronicaRef.SetExcludedCombatActions (0b000101000001000010110000000)

VeronicaRef is excluded from performing the combat actions: ATTACK_MELEE, ATTACK_HAND_TO_HAND, MOVE_AND_SWITCH_TO_MELEE, SWITCH_WEAPON, FLEE and USE_COMBAT_ITEM.

VeronicaRef.SetExcludedCombatActions 0

VeronicaRef may perform any combat action.

Notes

  • The effects of this function are reset upon loading a game.

See Also