client
North()
if(src.mob.dir == East)
if(src.mob.inair==0)
src.mob.inair = 1
src.Move(locate(step(src, NORTH,10)))
Gravity(src.mob)
South()
return
Northeast()
return
Northwest()
return
Southeast()
return
Southwest()
return
proc
Gravity(mob/M)
while(M.inair == 1)
var/turf/dencheck = locate(M.pixel_x,M.pixel_y-6,M.pixel_z/*M.step_y -= 6*/)
sleep(10)
if(dencheck.density == 1)
M.inair = 0
return
else
M.loc=locate(M.pixel_x,M.pixel_y-6,M.pixel_z/*M.step_y -= 6*/)
Problem description:
Hello, Byonders. I don't mean to be a bugger, but this seriously has me stumped. I've been observing source codes, I'll admit. But for this attempt, I've been trying to get a proc done on my own.
Basically, the Gravity proc is supposed to activate whenever I move up north, then make me move a few pixels done every few ticks. Buut.. everything I move north, I just crash.
Give me guidance, please. And I realize that the code is incomplete, considering I don't have a portion that checks whether I'm in the air so I can't infinitely 'jump'.. but eh.