ID:140386
 
Code:
mob
proc
height()
var/obj/main/checkheight = locate(usr.x,usr.y,usr.z)
usr.pixel_z = checkheight.height * 32


Problem description:
doesnt work, why

Because locate() returns a turf, not an obj, and definitely not an /obj/main.

Also: locate(usr.x,usr.y,usr.z) is profoundly silly and you should just be using usr.loc instead.

Oh, and you shouldn't be using usr in procs AT ALL. You should be using src instead, here.
In response to Garthor (#1)
Garthor wrote:
Because locate() returns a turf, not an obj, and definitely not an /obj/main.

Also: locate(usr.x,usr.y,usr.z) is profoundly silly and you should just be using usr.loc instead.

Oh, and you shouldn't be using usr in procs AT ALL. You should be using src instead, here.

thanks as you can see im kinda new, thanks to you it works.

mob
proc
height()
var/turf/checkheight = src.loc
src.pixel_z = checkheight.height * 32 + 32

client/Move()
..()
usr.height() // had to add this