ID:178434
 
how can I make it so that you lose a little bit of health every few minutes? I've tried using spawn but it only counts the seconds once I think.
Likwiddraino000 wrote:
how can I make it so that you lose a little bit of health every few minutes? I've tried using spawn but it only counts the seconds once I think.

Then you started on the right path. Spawn() doesn't start a loop for you, but when the spawned code finally executes there's nothing stopping you from spawning again. Thus such a loop would look like this:
mob
proc/Bleed()
if(!bleeding) return
if(bandage)
var/fix=min(bleeding,round(bandage/2,1))
bleeding-=fix
bandage-=fix
if(!bleeding) return
health=max(health-bleeding,0)
DeathCheck()
if(health) spawn(900) Bleed()

Every 90 seconds you lose health as long as the bleeding var is set. By applying a bandage, the bleeding will gradually stop (if you have a good enough bandage). If you're still bleeding at the end of the proc, it spawns itself and the loop starts all over again--you have another 90 seconds to stop the bleeding.

Lummox JR
In response to Lummox JR
i dont know how to do that but that sounds like a great idea for a game and dont worry i wont steel it im to shit at programming to create that