ID:177675
 
Ok well I'm trying to work out a creature system and I need them to poop automatically.

I already have an object called poop and a verb called

Use_toilet()

which can create poop on the map. my problem is I need a way to make this happen automatically and periodially
why not create a variable called bowels and create a proc that runs every 30-60 seconds or so, that adds 1 to bowels and then make another var called full and then check if bowels==full, call poop()

mob
llama
var
bowels = 0
full = 30
proc
poop()
var/obj/poop/P = new/obj/poop
P.loc = src.loc
P.desc = "Well, It's not a baby ruth..."
src.bowels = rand(0,5)
return 1
digest()
src.bowels += 1
if(src.bowels>=full)
poop()
spawn(rand(300,600)) digest()
else
spawn(rand(300,600)) digest()
return 1
New()
spawn(rand(300,600)) digest()
..()

You might want to make a mob called the poop man, who comes around and picks up the poop, so your world doesn't get... poopy...