Difference between revisions of "OnLoad - ObjectReference"
Jump to navigation
Jump to search
imported>Docclox |
|||
Line 29: | Line 29: | ||
== Notes == | == Notes == | ||
This event will '''not''' be called when the object is being loaded during initial savegame load. | |||
== See Also == | == See Also == | ||
*[[ObjectReference Script]] | *[[ObjectReference Script]] | ||
*[[OnUnload - ObjectReference]] | *[[OnUnload - ObjectReference]] |
Latest revision as of 18:00, 11 February 2024
Member of: ObjectReference Script
Event called when the object is "as loaded as it can be" - meaning:
- If the object is enabled, it will have completely loaded its 3D and be ready to animate or otherwise manipulated without issues.
- If the object is disabled, it will receive the event when it enters the loaded area but obviously will not have its 3D.
- The event is ALSO called when an object is enabled within the loaded area - in which case it will have its 3D when the event is fired.
Syntax[edit | edit source]
Event OnLoad()
Parameters[edit | edit source]
None.
Examples[edit | edit source]
Event OnLoad()
if !IsDisabled()
Debug.Trace("This object is loaded, playing animations should work now")
else
Debug.Trace("This object is loaded but disabled - so it doesn't have 3D")
endif
endEvent
Notes[edit | edit source]
This event will not be called when the object is being loaded during initial savegame load.