Background for Starfield
Member of the ObjectReference script
voidfunctionBlockActivation(boolabBlocked=true, boolabHideActivateText=false)Native

Description

Wiki Description

Blocks, or unblocks, normal activation processing for this reference. References with blocked activation will still send ObjectReference.OnActivate(...) events to scripts attached to them.

Documentation Comment

Turns on and off blocking of normal activation - OnActivate events will still be sent


Caveats

CK Wiki - Notes

If you block activation on a reference, the reference will no longer perform its "normal" activation processing. It won't be picked up, opened, etc. However, the script ObjectReference.OnActivate(...) block will still run.

Because of the way script events work, chances are that the object has already done (or ignored) its default activation processing by the time the script receives the event, so calling BlockActivation() on the object in the ObjectReference.OnActivate(...) block will not affect the current activation.

Also, if a script calls ObjectReference.Activate(...) on an object reference which has blocked activation, the ObjectReference.OnActivate(...) block on that script will run, but the object will not process activation normally. (Unless the default processing only parameter is true)

Note that BlockActivation does not disable the 'Activate' UI prompt on the object unless abHideActivateText is true.


Parameters

  1. boolabBlocked=true

    CK Wiki Description

    Whether to block or unblock activation.

    • Default:True
  2. boolabHideActivateText=false

    CK Wiki Description

    Whether or not to hide all indications the object can be activated

    • Default:False

Examples

; Blocks this door from processing activation normally but still appear to be activated
MyDoor.BlockActivation()
; Makes this door completely un-activatable, appearing to the player as if it were a staic
MyDoor.BlockActivation(true, true)
; Tells the door to handle activation normally
MyDoor.BlockActivation(false)

Auto-Generated Example

bool myBool__abBlocked
bool myBool__abHideActivateText

myObjectReference__toCallFunctionOn.BlockActivation(myBool__abBlocked, myBool__abHideActivateText)

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.