Is there a way to know witch way the players character is facing? I am making a jump verb and I want the character to jump the way it is facing soooo. Here is the code I have now.
jump()
src.locked2 = 1
src.density = !density
src.icon_state = "jump"
sleep(2)
src.y += 1
sleep(3)
src.x += 1
sleep(2)
src.x += 1
sleep(2)
src.y -= 1
src.icon_state = "moving"
src.locked2 = 0
src.density = !density
It works but the guy can only jump to the right. I think I need several if cammands to fix this. The only problem is I need some thing for the if command to call to see witch way he is facing. If you know how I can do this please reply. Thanks.
ID:149574
![]() Apr 2 2002, 4:05 pm
|
|
Rcet wrote:
if(src.dir == EAST) That's a good way to do it, but a slightly better way involves the switch proc: switch (src.dir) |
What you have to do is put an if() statement in there. Like:
That is probably the best way to do it.
-Rcet