How would i make it so if a usr turns East, the only face East the don't go East, as with all other dirs except north and south.
[EDIT] if you don't know what i mean, i mean like in TANKS.
-NilFisk
ID:178704
Apr 16 2002, 6:11 pm (Edited on Apr 16 2002, 7:01 pm)
|
|
In response to Lummox JR
|
|
Thanks Lummox but i have 1 problem with it,
South() var/back=turn(mob.dir,180) var/turf/T=get_step(mob,back) if(T) mob.Move(T,back) i dont keep going back like when i move foward, i go back, then when i pres south again i just flip the other way, how can i fix this? -NilFisk |
In response to NilFisk
|
|
NilFisk wrote:
Thanks Lummox but i have 1 problem with it, Hrm. I would guess then that the default Move() proc sets mob.dir to the second argument, if it's given one. Try changing that last line to this:
if(T) mob.Move(T,mob.dir)
Hopefully that will clear it up. Lummox JR |
You'd do something like this:
Hope that helps you.