TempCloneForm

From the Fallout3 GECK Wiki
Jump to navigation Jump to search
< [[::Category:Functions|Category:Functions]]

A function added by the Fallout Script Extender.

Description

Clones the calling reference or specified form and returns a new base form. This base form will not be persisted in the save game.

Syntax

[help]
(Clone:form) reference.TempCloneForm ToClone:form

Example

ref MyClone

set MyClone to TempCloneForm Vodka

Since a ref var storing a clone is reset to 0 on game restart, this function is useful for ensuring secondary scripts wait for another to complete it's init block before proceeding:

ref InitDone

if InitDone
  ; Other scripts know this one has completed its init block this game session
else
  ; do init block
  set InitDone to TempCloneForm Vodka
endif

See Also