ID:175630
 
how could I use a flick that is called when a mob moves. possibly overwrite mob/Move() or the directional verbs so the flick is called, while the mob moves normally.

could anyone help? I was thinking

mob/Move()
..()
flick("walk",src)

or something like that.

Would that work, or something you can think of that would work?

-ETG
It's easier than that. Load up your icon in Dream Maker and select the "walk" state (I assume you've already made this into the movie you want to see when the player is walking). Right-click the icon state and select Edit State. In the dialog that appears, check the box Movement State. Save the icon, recompile.

No need for any code.
In response to Air Mapster
As Air Mapster points out, movement states are the easiest way to do it.

Your modified Move() proc will work as well if you change the ..() line to . = ..(). One problem is it will also animate even if the mob does not move, so you should add a check:

mob
Move()
. = ..() // perform the default move and store the result in .
if(.) // if it moved
flick("walk",src)
return . // This line is here for clarity. DM automatically returns .


Both methods will only show the first few frames of the animation if the mob is moving quickly. If you want to show the full animation fluidly, even when moving faster than the animation frames allow for, take a look at http://www.byondscape.com/ascape.dmb/ Shadowdarke.2002-0330/#AT