ID:266723
 
I'm having troubles with the Cinnoms Side Scrolling Demo.I need it where if you just fall of an edge you can jump and try to get back up.I'm guessing the problem is somewhere within the jump proc witch is below.If you can figure out what is wrong please help.

    proc
jump() // jump, used for projecting yourself into the air, for your own reasons.
if(src.jumping == 1) // You can't jump if you're already jumping.
return
var/turf/aturf = locate(src.x, src.y-1, src.z) // Get the turf directly below you.
var/dense = 0
if(aturf)
for(var/atom/A in aturf)
if(A.density == 1)
dense = 1
break
if(aturf.density == 1)
dense=1

// Those few lines above are used to make sure you're on something dense. You can't jump if you're falling.
if(!aturf)
dense = 1
if(dense == 1) // If they're on something...
src.jumping = 1
for(var/I = 0, I < (gravity * 1.5), I++) // This is a traditional for loop that loops until I(init 0) is equal to gravity times 1.5.
spawn()
if(src.loc != null)
step(src, NORTH)
sleep(gravity)
if(src.jumping == 0)
break
src.jumping = 0
spawn(gravity) src.GravCheck()

thanks

-Beld
Knees the post in the back and bumps it up