ID:1025567
 
Keywords: dir, east, location, mob, state, west

Problem description:

I'm trying to figure out how to change a characters icon_state depending on an obj or mobs position. So if enemy mob is east of usr change icon_state to blank and if mob is west of usr change to fit the position


I assume you mean if you're to the east of a obj it'll look different than if you're to the west, which I'm unsure of how exact to do this with BYOND. Otherwise, you could use get_dir if you're just meaning to have two objs change icon stats depending on their location apart from eachother(ie: two mobs face eachother as they move around).
I got it working, i did something like if(usr.x<M.x) change icon state and if it's larger then change it to fit