Background for Fallout 4
Member of the ObjectReference script
boolfunctionActivate(ObjectReferenceakActivator, boolabDefaultProcessingOnly=false)Native

Description

Wiki Description

Activates this item with the specified reference as the activator.

Documentation Comment

Have akActivator activate this reference. If abDefaultProcessingOnly is true then any block will be bypassed
and no OnActivate event will be sent. The function returns true if default processing ran, and succeeded. If
default processing has been blocked, will always return false.


Caveats

CK Wiki - Notes

  • If the object reference has had activation processing blocked, this will still send the ObjectReference.OnActivate(...) event to scripts attached to the object, but will ignore normal processing (i.e. picking up the object, opening the door, etc). Unless, of course, you have the abDefaultProcessingOnly parameter set to true, in which case no event is sent, and the block flag is ignored.
  • In order for this function to work on containers, you must call Utility.wait() before the activate call. The wait has to be at least 1s.

Parameters

  1. ObjectReferenceakActivator

    CK Wiki Description

    Who will activate this object.

  2. boolabDefaultProcessingOnly=false

    CK Wiki Description

    If true, no OnActivate event will be sent to any scripts and the object will ignore the blocked flag.

    • Default:False

Examples

; Have the player 'activate' the door
NeatDoor.Activate(Game.GetPlayer())
; Have the player 'activate' the door, bypassing any blocked activation and NOT sending an event to any script
NeatDoor.Activate(Game.GetPlayer(), true)

Auto-Generated Example

ObjectReference myObjectReference__akActivator
bool myBool__abDefaultProcessingOnly

bool returnedValue = myObjectReference__toCallFunctionOn.Activate(myObjectReference__akActivator, myBool__abDefaultProcessingOnly)

Related Pages


Additional References

View this function’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.