Jump to content

One time only script.


Beluga

Recommended Posts

Hello.

 

That is quite easy actually. All you have to do is make the trigger script disable the trigger it is attached to. Once disabled, it will never trigger again (unless you enable it again by some other means).

 

ScriptName OneTimeTriggerScript

Begin OnTriggerEnter
;...
; do your stuff 
;...
Disable
End

 

Note that the above script will also be triggered by creatures and NPCs. If you want only the player to trigger the script once, change the line “Begin OnTriggerEnter” to “Begin OnTriggerEnter Player”.

 

Another note: The Disable command works like a Return command if used on the object the script is attached to. In this case, any more script commands coming after the Disable command would never be executed.

 

Have fun.

Link to comment
Share on other sites

  • Recently Browsing   0 members

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