ID:154724
Jan 8 2012, 1:31 pm
|
|
i need help im making a 2d engine so you can jump and fall but i cant seem to get it to get what turfs are south of your guy can anyone help me?
|
In response to A.T.H.K
|
|
i tried that this is what i got
mob icon = 'guy.dmi' icon_state = "guy" var/frozen = 0 verb north() set hidden = 1 if(!usr.frozen) step(src,NORTH) sleep(5) lol var/a = get_step(usr,SOUTH) for(var/turf/b in a) if(b.density == 0) step(src,SOUTH) goto lol east() set hidden = 1 if(!usr.frozen) step(src,EAST) dir = EAST sleep(5) lol var/a = get_step(usr,SOUTH) for(var/turf/b in a) if(b.density == 0) step(src,SOUTH) goto lol west() set hidden = 1 if(!usr.frozen) step(src,WEST) dir = WEST sleep(5) lol var/a = get_step(usr,SOUTH) for(var/turf/b in a) if(b.density == 0) step(src,SOUTH) goto lol Login() usr.Move(locate(1,7,1)) if you notice it gets var a which is spost to be the turf south of your guy |
In response to Shwb1
|
|
get_step() returns a turf. Turfs aren't in turfs.
|
http://www.byond.com/ members/?command=reference&path=proc%2Fget_step