Jump to content

Recommended Posts

Posted

This script is placed on an activator and reset object placement upon activation.

I can't compile it and I don't understand why.

Any idea?

 

 

  Reveal hidden contents

 

Posted (edited)

Was that it? I see another thing. Instead of using the GameMode block (which runs every frame) to init things, use an OnLoad block (which only runs once when the player enters that interior cell or gets near that exterior cell. You still need the DoOnce check. So just change GameMode to OnLoad.

 

Also, if you wanted that script to potentially work for anything else, you can set the activator's LinkedRef to the 01Ref object, and then in the script:

ref LRef

Begin OnLoad

    if DoOnce == 0
        Set LRef to GetLinkedRef
        ...etc...
    endif
end

Begin OnActivate
     
     LRef.SetPos to XIniPos
    ....etc....
end
Edited by GamerRick
Posted

That script will only reset the position one time though.

 

So to make it reusable , put this line at the end of the "OnActivate" block ...

 

Set DoOnce to 0

 

@ GamerRick Good thinking with the linked ref ;)

  • Recently Browsing   0 members

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