Background for Starfield
Member of the ScriptObject script
eventOnBeginState(stringasOldState)

Description

Wiki Description

Event called when the state the event is in has just been switched to. Note that this block will NOT be called for an auto state when the object is initialized.

Documentation Comment

Event called after the script's state changes - passing in the old state
Not called on auto states when the script is first initialized


Parameters

  1. stringasOldState

    CK Wiki Description

    The state that the script was in before it switched to the current one


Examples

State Running
  Event OnBeginState(string asOldState)
    Debug.Trace("Entered the running state from the " + asOldState + " state!")
  EndEvent
EndState

Auto-Generated Example

Scriptname MyCoolScript extends ScriptObject

event OnBeginState(string asOldState)
    Debug.trace("Event received - OnBeginState: asOldState = " + asOldState)
endEvent

Related Pages


Additional References

View this event’s page on the Fallout 4 Creation Kit Wiki

Some data provided by the Fallout 4 Creation Kit Wiki. Licensed under the Creative Commons Attribution-Share Alike 4.0 license.