ActorHasBaseFlag

From GECK
Jump to: navigation, search


A function added by the ShowOff NVSE Plugin version 1.15.

Description

Returns true (1) if the Actor's BaseForm has the specified flag enabled. If the function is called with an actor reference (actorRefr), its BaseForm is used.

The flag being checked is different depending on if the actor is a Creature or an NPC.

This function can be used either in a script, or as a Condition.

Syntax

[help]
(hasFlag:0/1) actorRefr.ActorHasBaseFlag flagIndex:int actor:baseForm 

Or:

(hasFlag:0/1) actorRefr.GetActorHasBaseFlag flagIndex:int actor:baseForm 

flagIndex Values

Flag Index (Bit) NPC Flag Creature Flag
0 female unknown
1 essential essential
2 has chargen face "weapon&shield?"
3 respawn respawn
4 auto-calc stats swims
5 unknown flies
6 unknown walks
7 pc level mult pc level mult
8 unknown unknown
9 no low-level processing no low-level processing
10 unknown unknown
11 no blood spray unknown
12 no blood decal unknown
13 unknown unknown
14 unknown unknown
15 unknown No head
16 unknown No Right Arm
17 unknown No Left Arm
18 unknown No Combat In Water
19 unknown No Shadow
20 no VATS melee no VATS melee
21 unknown Allow PC Dialogue
22 Can Be All Races Can't Open Doors
23 Auto-Calc Services Immobile
24 unknown Tilt Front/Back
25 unknown Tilt Left/Right
26 no knockdowns no knockdowns
27 not pushable not pushable
28 unknown Allow Pickpocket
29 unknown Is Ghost
30 no rotate to head track no rotate to head track
31 unknown Invulnerable

Example

let short bHasFlag := SunnyREF.ActorHasBaseFlag 23

bHasFlag will be set to 1 if SunnyREF's BaseForm (GSSunnySmiles) has the Auto-Calc Services flag enabled, 0 otherwise.

let short bHasFlag := ActorHasBaseFlag 5 CrBloatFly

bHasFlag will be set to 1 if CrBloatFly has the Flies flag enabled, 0 otherwise.

Notes

  • This function essentially checks GetActorBaseFlagsLow and GetActorBaseFlagsHigh for the enabled bits.
  • This was made with condition functions in mind, as unlike in scripts, bit manipulation is not possible for conditions.

See Also