ID:141726
 
Code:
world
view = 21
mob
icon = 'male.dmi'
mob
Login()
src.loc = locate(1,1,1)
sleep(10)
src.gravity()
atom/movable/Move()
if(dir == 1)
var/obj/block/block
for(block in locate(src.x,src.y-1,src.z))
jump()
return ..()
if(src.y<2)
jump()
return ..()
else
return ..()
mob
proc
gravity()
if(src.y>=2)
takedown()
sleep(10)
src.gravity()
mob
proc
takedown()
spawn(5) usr.y -= 1
atom
proc
jump()
spawn(1) usr.y++
spawn(3) usr.y++
spawn(5) usr.y++
spawn(7) usr.y++
turf
floor
blackness
icon = 'blackness.dmi'
atom
var
jumpover = 1
canjump = 0
activategrav = 1
obj
block
density = 1
icon = 'block.dmi'
notblock
density = 0
icon = 'block.dmi'


Problem description:
The gravity works, the user jumps and goes up a 4 blocks, *Trying to make a game based around this*
But when the users jumped, he cannot scroll to left or right.
he will jump and go down, any ideas?
By the way, when hes landed back onto Y 1, he can move again, and when hes landed on a few blocks i put in the air.
If I had to guess, I would say that the problem is with how your gravity proc is working... I would try:
mob
Login()
src.loc = locate(1,1,1)
sleep(10)
spawn() src.gravity()

proc
gravity()
if(src.y>=2)
takedown()
spawn(10) src.gravity()

I'm not sure why you're sleeping in Login(), and I'm not too fond of calling "takedown()" unless you use it more than just in that one spot... but those are just minor details...
In response to Ephemerality
Darn, didnt work, i tryed it, i forget why i put gravity with a sleep.


Gravity system, a pain :|

Thanks for trying
Now that I'm off work, I was messing around with it a bit... the actual functionality of it is a bit strange, but in any case, I did notice that you're checking if(dir == 1)... but without the Move() actually taking place, the direction the mob is facing stays the same. After changing it to:
atom/movable/Move(NewLoc, Dir)
if(Dir == 1)

You can move while the gravity stuff is taking place.
In response to Ephemerality
Thanks, i will implement that now :)