Multiple animations on game character

Right now I’m working on a little project, a complete game I’m creating, but I’ve encounterd some problems on my game character. Here it comes:

I made 2 animations for my game character, a walk animations and an animations that will be played when he’s idle.
The Idle animations is connected like: [Sensor: always]–[and]–[Actuator: action: idle]
The second animation for walk is like: [Sensor: up key]–[and]–[Actuator: walk]
The piority of the idel animation is 1 and walk animation is 2, so when I press up the walk animations overwrites the idle animation.

When I test this, it doesn’t work, whatever I try I don’t get the walk animation overwriting the idle animation.
My question is, did I something wrong? or do I have to set up the logic another way to add 2 animations to the same game model?

I would be happy if someone could help me with this. :smiley:

You have the priorities reversed. Actions with a smaller priority number overwrite actions with higher numbers. Don’t ask me why it’s that way, but it is.

Maybe something to do with 1 coming before 2…!! LOL!

I fixed it, I did this: [Keyboard: W]–[and]–[action idle, priority: 2] [keyboard: w]–[and]–[action: walk, priority 1]
The keyboard sensor of the walk animation has pulse off, the keyboard sensor of the idle animation has pulse on, included the inv turned on. All the 2 action actuators has got a Blendin of 5 to switch smoothly to another animation.

How does it work?: When you aren’t giving the character any move directions, it plays the idle animation. When you walk the idle animation becomes overwritten by the walk one. When you walk, the idel animation will be played on the background, but you won’t see it, if you stop walking, it switches back to the idle one smoothly using blendin of 5.

I learned this from Nor.J, I posted the answere for people that would use this information in the future using the search funtion searching for: 2 animations on 1 character or model. :smiley: I learned something again. :stuck_out_tongue:

If you want to make the idle animation stop playing in the background, you could do this:
[Keyboard: W (inv)]–[and]–[action idle: loop stop]
[Keyboard: W]–[and]–[action walk: loop stop]

Notice the action actuators in this example don’t need priorities, since one only plays when the key is pressed, and the other only plays when the key is released. It’s usually recommended to design the logic so that only one action is playing at once.[/quote]