Just wondering, how would I make it so a mob would respond to a click on a turf by not moving to it but facing in the general direction of the click?
Hope that's clear enough.
- GunRunner
ID:169731
May 8 2005, 12:35 am
|
|
In response to Crispy
|
|
Thanks man.
|
In response to Crispy
|
|
Crispy wrote:
Override the built-in client/Click() proc, remembering to do a return ..() at the end. (Look up "Click proc (client)" in the F1 reference.) I'd even recommend get_approx_dir() as posted in [link], for facing in a general direction. That way it won't look weird if you click something 5 tiles north and 1 east. With get_dir() the player would then be facing northeast, but this would return north as the general direction instead. Lummox JR |
In the proc, use get_dir() to get the direction from the client's mob to the atom that was clicked on, and set the client's mob's dir to the result.