Wintermute Engine Forum

Wintermute Engine => Technical forum => Topic started by: Krosad on August 01, 2012, 08:13:14 PM

Title: Walk and run animation
Post by: Krosad on August 01, 2012, 08:13:14 PM
Hi,

By default actor have walk animation. How to add run animation and associate its activation with some button?
Title: Re: Walk and run animation
Post by: Spellbreaker on August 01, 2012, 09:16:16 PM
There's no run animation by default. You simply create a run animation in the actor file. If you want to "run" on rightclick for example, you can do something like

on "RightClick" {
actor.WalkAnimName = "run"
}

on "LeftClick" {
actor.WalkAnimName ="walk"
}

Greets,

Spellbreaker
Title: Re: Walk and run animation
Post by: Krosad on August 01, 2012, 09:40:54 PM
and how to add some other animation after stop running?
Title: Re: Walk and run animation
Post by: Spellbreaker on August 02, 2012, 03:46:07 PM
thats a bit more complicated if you need to "hit" a specific frame...you could start looking at actor.IsWalking() for example to check if he is walking . then you could create an event in your sprite to "jump" to a specific other frame or play another animation