Disable

From GECK
Jump to: navigation, search


A function included in the GECK for Fallout 3.

Description

Disabled the calling reference. Disabled references are not rendered, and disabled actors will not process their AI. Scripts will run on disabled references.

Syntax

[help]
Disable FadeOut:Int{Default = 0}

Example

TerminalRef.Disable

TerminalRef, if previously enabled, will be disabled. Because the [FadeOut] parameter was not set, TerminalRef will not fade out by default.

TerminalRef.Disable 0

With the parameter set as '0', the object will not fade out.

Notes

  • Disabled objects will still run their attached scripts. Disabled actors will NOT run their attached scripts, however if an actor is disabled with this command the script will continue to run until the area is left and will no longer run once the area is revisited. For this reason it is recommended to use GetDisabled if you need to make sure code on disabled actors does not run.
  • If multiple references should share an enable state, Enable Parenting should be used so that Enable only needs to be called once in order to affect the enable state of all appropriate references.
  • If Disable is called on a reference with an Enable Parent, it will have no effect.
  • The [FadeOut] parameter does not affect the children of an Enable Parent. The children will still pop out when disabled.
  • Disable does not remove references from the game, just stops them from rendering. Do not rely on Disable to prevent savegame bloat by removing references. MarkForDelete should be used to remove references from the game.
  • Disable has no effect if used on a Inventory Reference.
  • Disable does not work with OnAdd code blocks, instead use OnActivate.
  • Will work with items that have OnDrop code blocks.
  • Disabled actors cannot be forced to activate objects via Activate.
  • Disabling the object on which a spell is active during the ScriptEffectStart block causes unpredictable behavior in the later spell blocks.

See Also