ID:261757
 
I'm trying to create a proc that after being inactive for so long it makes you do something, whihc in the case is to do flick. I tried this and got no errors.

mob/proc/Inactive()
if(!client)
return
else if(client.inactivity == 100)
flick("inactive",src)
spawn() src.Inactive()

mob/PC
Login()
..()
spawn()
src.Inactive()

client.inactivity is a var built in with byond so you know, though i'm sure you already did! =] Well, anyways, I get no runtime errors but yet it doesn't execute flick. Any suggestions on how to fix it?

Resonating Light
Yeah. You're using == and not >=. Also, don't call Inactive every 0 seconds. Use spawn(100-client.inactivity).
In response to Garthor
Garthor wrote:
Yeah. You're using == and not >=. Also, don't call Inactive every 0 seconds. Use spawn(100-client.inactivity).

Thanks-a-million, I had forgotten that inactivity is constantly raising.

Resonating_Light