Time bomb script

Post » Sun Feb 03, 2013 4:45 am

Here is a script I am trying to make. I want to create an explosion after a valve is turned (which works fine) but I haven't been able to disable the activator- after you turn the valve once, I want it to be unturnable from then onwards (otherwise you get multiple explosions). As you can see, I have tried using blockactivation, but I've read that this doesn't stop onactivate events from firing. Is there something I can change it with to prevent the activator being activated more than once?

Scriptname SBQValveBomb extends ObjectReference [/size]Explosion Property SBQDweChan Auto [/size]ObjectReference Property SBQDweChanRef Auto [/size]ObjectReference Property SteamNoise Auto [/size]Auto STATE Waiting[/size]EVENT onActivate (objectReference triggerRef)[/size]if HasActivated == 0HasActivated == 1SteamNoise.Enable()Utility.Wait(25)SBQDweChanRef.PlaceAtMe(SBQDweChan)SteamNoise.Disable()self.BlockActivation()elseif HasActivated == 1self.BlockActivation()endifendEVENTendState
User avatar
Samantha Pattison
 
Posts: 3407
Joined: Sat Oct 28, 2006 8:19 pm

Post » Sun Feb 03, 2013 12:51 am

Send it to another state (empty) after you've done what you want to do. There are plenty of vanilla scripts that use empty states if you need some examples.
User avatar
Princess Johnson
 
Posts: 3435
Joined: Wed Feb 07, 2007 5:44 pm


Return to V - Skyrim