Disable animation repeat
Posted:
Tue Mar 23, 2010 7:57 pm
by grandeMur87
Hi all,
i need to change dinamically the "animation repeat" variable from script, not from the window displayed when the "Change animation" button is clicked, because the default value is "enable".
How can I resolve the problem?
PS:
I need this because the character can use different weapons, so the animations are designed for each weapon.
Re: Disable animation repeat
Posted:
Tue Mar 23, 2010 8:11 pm
by makslane
Re: Disable animation repeat
Posted:
Wed Mar 24, 2010 10:04 am
by grandeMur87
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...