ID:167674
 
How would I make something happen repeatedly until I stop it?

This for example:
mob
verb
spam(m as mob in world)
m << "<b><font color=red>SPAM. SPAM. SPAM</font></b>"
sleep(10)


(obviously I am not going to use that verb..... >.>)

Thanks, -= Dice =-
You could use a for or while loops..

mob/verb/spam(mob/M in world)
while(M.Spamcount <> M.Spam_max)
M <<"\red <b> SPAM! </b>"
M.Spamcount += 1
sleep(10)


----or----

mob/verb/spam(mob/M in world)
for(var/I = 0, I<M.spam_max, I++)
M <<"\red <b> SPAM! </b>"
sleep(10)

Crappy examples. you don't even have to use mob vars. (Spamcount and Spam_max.) In the for() you can put a number instead of "M.spam_max"
mob/verb/spam(mob/M in world)
for(var/I = 0, I<100, I++)
M <<"\red <b> SPAM! </b>"
sleep(10)

Be sure to look up for() and while() in the DM Guide, or help file (F1 in Dream maker!)

-This is probly really confusing.-

Also, Dream Maker has predefined "\" uses. \red makes the whole text red.
\green = green
\blue = blue
etc. etc.
Saves up some typing time. =)
In response to Mechanios
Ok I have that going now and I am using it for a few processes, but how do I stop it haha, I've tried but cant get it to stop.

Thanks .:: Dice1989 ::.
In response to Dice1989
mob
var
trigger=0
proc
Trigger()
src.trigger=1-src.trigger
while(src.trigger)
world<<"Woohoo! It works!"
sleep(10)

This will start when you call the proc and end once called a second time.
In response to Exophus
      src.trigger=1-src.trigger


Better yet...

      trigger=!trigger