ID:177502
 
How can I make it so when I press up, if the usr is next to an item, it puts them on top of it. So far I have:

//atom/movable
// var I might Use It
// item = /obj
mob
icon = 'player.dmi'
icon_state = "left"
client
Northwest()
return
Northeast()
return
Southwest()
return
Southeast()
return
North()
if(usr.x == item.x - 1 || usr.x == item.x +1)
usr.x = item.x, usr.y += item.y
East()
if(usr.icon_state == "right")
step(usr,EAST)
if(usr.icon_state == "left")
usr.icon_state = "right"
step(usr,EAST)
West()
if(usr.icon_state == "left")
step(usr,WEST)
if(usr.icon_state == "right")
usr.icon_state = "left"
step(usr,WEST)
turf
background
icon = 'background.dmi'
wall
icon = 'wall.dmi'
density = 1
block
icon = 'block.dmi'
density = 1
world
turf = /turf/background


I do know how to do it using verbs, but I want it by using North().

thanx
DiZzyBonne
North() is a verb... so if you know how to do it in a verb, you already know how to do this. You might have to rearrange a few things, since src of North() is the client... but that just means if you referred to the mob as src in the verb, you now have to use src.mob.