ID:764276
 
(See the best response by Neimo.)
Code:
mob
EarthGravity
verb
Earth_Gravity()
set category = "Fighting"
for(var/mob/M in oview(8))
spawn(1)
for(var/mob/X in oview(8))
X.rundelay += 3


Problem description:

I'm Trying To Make A New Class Base On Gravity, But I don't know how to go about it, So far i got this.

basically the only thing i need to know is how to make X.rundelay to return to normal again after maybe 30sec. Its like a Temp debuff, It make them walk slow for 30sec then after that time the effect is lift. and who ever was in the oview"8" will have there var return to normal.

So How is the best way to do it?
Store the values before changing them, then spawn() for as long as you need and set them back.
So Like, Make a Proc, Rundelay + = 3 Sleep(30) Rundelay = 0

You Mean Something Like that?
var/original = rundelay
spawn(time)
rundelay = original
// do your other stuff here.


spawn() won't do anything until time comes up, and it lets the rest of the procedure run.
mob
proc
Gravity()
set category = "Fighting"
set name = "Gravity"
if(usr.firing = 0) - Error missing expression -
usr.firing = 1
usr.rundelay += 3
sleep(30)
usr.rundelay = 0
usr.firing = 0
else
view(8)<< "<b> Your Already Doing Gravity"

I couldn't understand your code above completely i only got the jist, But not enough to make something with.

So I Tried That code above, But I'm Getting and error missing condition. But my question is that code i made will it work?
In response to OrganizationXIIGaming (#4)
You need two equal signs (==) in an if() statement, though in this case you should be doing if(!firing).
Thanks, I'll See if this Code works.
It Seem to work But One Problem

mob
proc
Gravity()
set category = "Fighting"
if(usr.firing==0)
usr.firing = 1
usr.rundelay += 3
sleep(50)
usr.rundelay = 0
usr.firing = 0
else
usr << "<B>Your Already Doing Gravity!"



mob
Earth
verb
Earth_Gravity()
set category = "Fighting"
for(var/mob/M in oview(8))
spawn(1)
for(var/mob/X in oview(8))
X.Gravity()

It Seem Its make my Speed reduce aswell lol. how do i make it so only the people around me. get reduce
Best response
You would need to either change it to for(var/mob/m in oview(8, usr)) to gather mobs around your mob or have an if() statement checking if m is you.