Hello @ all,i have 2 questions:
1. How can i set a name of an animation like CharacterNode.SetFrameLoop(320,360)
The reason for that is, that i want to check inn whick animation my CharacterNode is.
2. When i am using an MD2-Mesh with animations,i can start an animation with CharacterNode.setMD2Animation(MD2AnimationType.RUN).
Could i check in whick animtion my character is.
Something like this:
CharacterNode.getAnimation();//return RUN
Thx for Help
Note: I am using Irrlicht.net
Animations /2 Questions
I dont think you can get/set the name of an animation. But you could set something up yourself. You could have a method which tells you by checking the current frame number, which you do have access to, and then checking in which range of frames it lies in to tell you which animation it is. So if the frame number was 340 say, then the method would say it was doing the run animation.
Why do you want this btw? Have you seen the AnimationEndCallBack? Might that help you?
Why do you want this btw? Have you seen the AnimationEndCallBack? Might that help you?
my problem is,when i am pressing my key for moving forward i starting die animation RUN,but when i keep the key pressed the animation starts again....i want start the animation if the key is pressed and the animtion hasn`t start.I think thats a good way that the animation not starts again and again.
Have other ideas?!
Thx
Have other ideas?!
Thx
Just keep a bool variable as to whether your character is walking. First time you get the key press it will find the bool to be false as the character isnt walking so it sets the bool to true and starts the animation. If it then detects the press again it checks the bool and finds it true as the character is still walking and so it then wont start the walking animation.
