ID:179134
Feb 13 2002, 1:48 pm
|
|
Could someone please give me an idea of how to test for movement with get_step? I've been trying if(get_step() == WEST), but this hasn't been working.
|
In response to Foomer
|
|
The only reason I need this right now is to change icon states when people move in different directions. I think that the first method you listed would work well, but it's giving me some errors. I'm still not sure what I'm supposed to insert in place of the variables you listed. Could you tell me why this isn't working? Thanks.
var/N = get_step(src,NORTH) if(N.var == 1) icon_state = "n" |
In response to Gakumerasara
|
|
Why are you doing that, you know byond has build in diections in the icon editor, right?
|
In response to Gakumerasara
|
|
Since get_step returns a turf, you wouldn't want to use this for changing a mob.
Why don't you just animate them from the icon editor to change their direction? The best solution would probably be to override client movement, so that it changes whatever you want changed. client.North() ..() usr.icon_state = "whatever" |
In response to Foomer
|
|
I didn't know that I could do it that way. Should I just change the state names to NORTH, SOUTH, etc., or do I have to do something else?
|
In response to Gakumerasara
|
|
Click the little movie camera icon next to the pallet thing at the top of the editor window.
|
In response to Nadrew
|
|
Doh . . . I never knew what that thing was for.
me <<<<< stupid newbie sorry for the trouble |
so if(get_step(src,NORTH)) would be basically "if there is a turf to the north."
You could do things like:
In your cause, you'd probably want: