|
I'm working on an FPS gun script, and i took the "reload" function from the script in the FPS tutotrial.
I added animation.Play like this:
The problem is that it plays the animation after the "WaitForSeconds". What should I do to make the animation play within the time span?
(comments are locked)
|
|
Move the wait to after the animation starts. You probably also want to have it inside the clips test, and update bullets left after the wait is over.
If it would help you understand the flow of code, let's break down the Reload function into smaller parts: actually i tried that before,but the scripts still wont work.. the waiting part functions correctly, but it wont play the animation...
Dec 17 '10 at 02:36 AM
user-3061 (yahoo)
But you wrote: "The problem is that it plays the animation after the WaitForSeconds". Make sure the object has an animation and the animation has a clip called "Reload".
Dec 17 '10 at 02:43 AM
Statement ♦♦
yes it has a clip named reload, im very sure
Dec 17 '10 at 02:54 AM
user-3061 (yahoo)
Okay, i got it working now (partially), but your answer is correct, it was some other animation's problem. Thanks!
Dec 17 '10 at 03:21 AM
user-3061 (yahoo)
(comments are locked)
|
