ID:178163
 
Hi again.
My laser(projectile) system is fully functional now, and
I am not having any problems with creating objects. I am
however having trouble with my icon_states. I can easily change icon_states, and I can use the flick() command. I have been trying to find out how to get my character's icon_state to respond to whether or not he/she is moving.
I have edited the Move() command so that when the character starts, its icon_state is a still picture of him, and when he moves it becomes a movie icon of him, thats great, but once he stops moving it does not revert back to the still picture icon_state. Here is the snippet:

client
Move()
if(usr.icon_state == "male")
usr.icon_state = "male_walk"
if(usr.icon_state == "female")
usr.icon_state = "female_walk"
usr.MoveCheck()
return ..()

mob
proc
MoveCheck(mob/M)
if(Move() = null)//Need correct argument
if(usr.icon_state == "male_walk")
usr.icon_state = "male"
if(usr.icon_state == "female_walk")
usr.icon_state = "female"
else
return ..()

1.Is there an easier way?
2.How then could I specify any instance when the Move() proc is NOT active?
Sorry again if this is elementary,
but I can't get it on my own.
Thanks, Vercingatorix
lol.. yes their is..

make a female.dmi and male.dmi..then make an input at startup to select with gender.. and just make the direction frames.. to female and male.
also like if u got a dance verb like this,

in the female.dmi don't make a female_dance state just call it dance.. and make another one in male called dance as well.. if you put

mob/verb/dance()
usr.icon_state = "dance"

if won't get confused which state to pick.. the danc ein male.dmi or female.dmi.. it members which dmi you are in. o_o;
In response to ShadowSiientx
it will only remember the dmi.. if u got an Icon selection at the beginningg

client
Move()
. = ..() // see what the default Move() returns
if(.) // it moved
var/walk_state = mob.icon_state + "_walk"
flick(walk_state,mob) // flick the animation on this client's mob
return . // this is included for clarity