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
ID:175630
Mar 25 2003, 1:21 pm
|
|
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 |
No need for any code.