- Home /
animation not playing
So I have a weapon, an F2000, and it is animated to shoot when Fire1 is pressed, and reload when r is pressed. When shooting it works fine, but the reload animation doesnt play. The F2000 game object has the animations attached to it, I can see them in the inspector, but they still wont play. I dont get an error message where the animation cant be found, the animation just wont play :/
more information: The script now plays an idle animation, and idk if this helps but the gun correctly plays the idle animation whenever the gun isnt reloading or shooting, but while it is "reloading" nothing animates, and when i assume it is done reloading, the gun picks up where it left off at the "idle" animation. I hope this helps :/
function Update() { if (!animation.isPlaying) animation.Play("idle"); }
function Fire () { animation.Play ("shoot"); }
function Reload () { animation.Play ("reload"); }
I have my code for animations in a separate script, and attac h that script to the weapon prefab of the game object. It worked fine with my other weapons, but just not the F2000. I edited my post to include some code