Home   Help Search Login Register  

Author Topic: How do I end this script?  (Read 862 times)

0 Members and 1 Guest are viewing this topic.

Offline Ghost644

  • Members
  • *
    • Ghostland
How do I end this script?
« on: 27 May 2006, 15:45:02 »
I would like this script to end after a certain amount of time, or even better when a trigger is activated.

#loop
_ran = random 8

? (_ran <= 1) : goto "one"
? (_ran <= 2) : goto "two"
? (_ran <= 3) : goto "three"
? (_ran <= 4) : goto "four"
? (_ran <= 5) : goto "five"
? (_ran <= 6) : goto "six"
? (_ran <= 7) : goto "seven"
? (_ran <= 8) : goto "eight"

#one

bomb = "heat120" camcreate (getpos g1)

goto "end"

#two

bomb2 = "heat120" camcreate (getpos g2)

goto "end"

#three

bomb3 = "heat120" camcreate (getpos g3)

goto "end"

#four

bomb4 = "heat120" camcreate (getpos g4)

goto "end"

#five

bomb5 = "heat120" camcreate (getpos g5)

goto "end"

#six

bomb6 = "heat120" camcreate (getpos g6)

goto "end"

#seven

bomb7 = "heat120" camcreate (getpos g7)

goto "end"

#eight

bomb8 = "heat120" camcreate (getpos g8)

goto "end"

#end

~5

goto "loop"
Ghost

Offline Pilot

  • Contributing Member
  • **
Re: How do I end this script?
« Reply #1 on: 27 May 2006, 15:50:20 »
In the trigger On Activation field, type:
StopBarrage=true;

Now, modify the script so it looks like this:
Code: [Select]
#loop
?StopBarrage: exit
_ran = random 8
? (_ran <= 1) : goto "one"
? (_ran <= 2) : goto "two"
? (_ran <= 3) : goto "three"
? (_ran <= 4) : goto "four"
? (_ran <= 5) : goto "five"
? (_ran <= 6) : goto "six"
? (_ran <= 7) : goto "seven"
? (_ran <=  : goto "eight"

#one
bomb = "heat120" camcreate (getpos g1)
goto "end"

#two
bomb2 = "heat120" camcreate (getpos g2)
goto "end"

#three
bomb3 = "heat120" camcreate (getpos g3)
goto "end"

#four
bomb4 = "heat120" camcreate (getpos g4)
goto "end"

#five
bomb5 = "heat120" camcreate (getpos g5)
goto "end"

#six
bomb6 = "heat120" camcreate (getpos g6)
goto "end"

#seven
bomb7 = "heat120" camcreate (getpos g7)
goto "end"

#eight
bomb8 = "heat120" camcreate (getpos g8)
goto "end"

#end
~5
goto "loop"

-Pilot

Offline Ghost644

  • Members
  • *
    • Ghostland
Re: How do I end this script?
« Reply #2 on: 27 May 2006, 16:11:29 »
Holy crap! Talk about easy, sigh i hate being a newb. Thankyou soo much!
Ghost