Activation flags
References may have extra flags attached, serialized as an ACTN subrecord (4 bytes). This is permanent state, kept from frame to frame.
Code: Select all
ActivationFlag_UseEnabled = 1
ActivationFlag_OnActivate = 2
ActivationFlag_OnDeath = 10h
ActivationFlag_OnKnockout = 20h
ActivationFlag_OnMurder = 40h
ActivationFlag_DoorOpening = 100h
ActivationFlag_DoorClosing = 200h
ActivationFlag_DoorJammedOpening = 400h
ActivationFlag_DoorJammedClosing = 800h
Note that the ActivationFlag_UseEnabled is saved to the reference, which will result in permanently suppressed activation if the reference script is removed. This occurred when removing the animated containers mod, and the fix in MCP is to reset UseEnabled to true on loading a game.
OnDeath, OnKnockout and OnMurder are set as soon as the respective event occurs. All damage sources including Mod* commands call out to check the actor state.
The door flags indicate animation state as they transition between open and closed, and are mutually exclusive. Doors are flagged as jammed if there is an actor colliding with it. The Lock script command immediately closes a door and resets animation state.