by grandeMur87 » Wed Mar 24, 2010 10:04 am
I tried the suggested solutions, but the problem is another.
I have a character with two (for now) set of animations for each of weapon (run right, run left, jump right, jump left, down right, down left).
Now:
1. The default weapon variable is on 1. So, the default animations is those for the first weapon.
2. When picked the second weapon, the "weaponTwoEnable" variable is setted to true and when clicked the button 2, I have to set the new animations to the characters. So, for example, when the "right" button is clicked, the code checks the weapon variable and sets the "run right" animation for the selected weapon. But, if I do so, the animation doesn't functions correctly, because the "repeat" variable of the "Change animation" method is setted on "enable" by default. So, I have to set to "disable" this variable from the code, so that the animation can be displayed correctly.
Hope I explained well the problem.
The last chance is to use a different actor for each weapon, so when picked up a new weapon, I destroy the current actor and create the new actor, but this is very boring...