Pixel Movement

by Forum_account
Pixel Movement
A pixel movement library for isometric and top-down maps.
ID:854279
 
BYOND Version:495
Operating System:Windows XP Pro
Web Browser:Firefox 13.0.1
Applies to:pixel movement
Status: Open

Issue hasn't been assigned a status value.
hi Forum_account. i have a difficult debug for you. i have verified that this code does work when replacing stepped_on for Entered proc.

in this example i have two maps. the second map has a turf with a dirt tag. when the mob walks over the sand turf in the first map, the mob should be displayed on the dirt turf of the second map but instead the mob is displayed in the second map at the same x and y coordinates of the first map located at where the sand turf was.

turf
sand
icon = 'icons/Sand.dmi'
stepped_on(mob/m)
if(ismob(m) && m.client)
var/turf/T = locate("dirt") //find the destination
if(T)
m.loc = T
The library tries to detect when you've changed the mob's loc but it doesn't catch it all the time. You can use the set_pos() proc instead to set the mob's position:

var/turf/T = locate("dirt")
if(T)
m.set_pos(T.px, T.py, 0, T.z)