ID:2178410
 
(See the best response by Kaiochao.)
I'm wanting to make the player's controlled sprite turn (roughly) toward where the player clicks if the player clicks something valid (turf/object/other mobs). However, I'm at a bit of a loss as to where to even start to do this. The player only needs to face north, south, east, and west, so including turns for the non-cardinal directions isn't necessary.

client
Click(object, location, control, params)
..()
mob.dir = get_dir(mob, object)
I'd need it to set it to either North, East, South, or West.
In response to Gooobai
Best response
In that case, you should probably use this:
http://www.byond.com/forum/?post=195151

client
Click(object, location, control, params)
..()
mob.dir = get_general_dir(mob, object)
Thanks much!