Jump to content

[LE] "OnEnable" Event


greyday01

Recommended Posts

I know there is no such event but is there a way to script the same effect as if there was?

 

There is a quest that at the end enables a ActivatorRef. I want to move it outside the walls to someplace out of sight but it seems to want to stay in the original location.

Link to comment
Share on other sites

You wrote: "is there a way to script the same effect as if there was?"

 

I assume you are talking about objectReference script, if ReferenceAlias use self.GetReference() instead.

EVENT OnCellLoad()
; it runs once, regardless object is disabled or enabled - cell has been loaded by game engine
; if you need, you are able to switch on/off objects here
;;; IF self.IsDisabled()
;;;    self.Enable()           ; switch on
;;; ELSE
;;;    self.Disable()          ; switch off
;;; ENDIF
ENDEVENT

EVENT OnLoad()
; self (the object that script is attached to) has to be enabled and 3D is also ready
; otherwise this event does not fire up
ENDEVENT

EVENT OnUnLoad()
; it runs mostly once, regardless object is disabled or enabled - cell has been unloaded by game engine
ENDEVENT
Edited by ReDragon2013
Link to comment
Share on other sites

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...