Jump to content

making a fake load door close itself


Recommended Posts

basically I need a load door to close after the player has activated it, at the moment the fake load door teleports the player to an xmarker but does not close itself after being used.

 

I want to have multiple fake load doors teleport the player to one xmarker heading.

 

the script I am using on the fake load doors at the moment:

 

Scriptname AAAloaddoorteleporttoxmarker extends ObjectReference Const
ObjectReference Property XMarker Auto Const
Event OnActivate(ObjectReference akActionRef)
if akActionRef == Game.GetPlayer()
Utility.Wait(1) ; Wait for 1 seconds
Game.GetPlayer().MoveTo(Xmarker)
endif
EndEvent
Event OnCellDetach()
Self.SetOpen(false)
endEvent
another script I tried using but got the same result:
Scriptname AAAloadDOORtelportXMARKER2 extends ObjectReference Const
ObjectReference Property XMarker Auto Const
Event OnActivate(ObjectReference akActionRef)
if akActionRef == Game.GetPlayer()
Self.SetOpen(false)
Utility.Wait(1) ; Wait for 1 seconds
Game.GetPlayer().MoveTo(Xmarker)
endif
EndEvent
thank you.

 

Link to comment
Share on other sites

My guess is that it can not process SetOpen(false) until it is fully open (GetOpenState == 1), so that I'd suggest using OnOpen instead of OnActivate, because OnOpen says: "Event called when the object has finished opening."

Link to comment
Share on other sites

  • Recently Browsing   0 members

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