- Home /
SimpelTimerScript
Ok 2 questions
First i have a solider in 3rd Person and if i press "g" it plays an animation which moves his arm like he throws a grenade and a grenade will be shoot
know i i have the problem that the my arm must be ready before the grenade is launched so the grenade is launched maybe at the half time of the animation i thought that if i would put a timer in my shoot script that says if i press g it waits 2 seconds and than it shoots put i dont know how to write in script
the second problem is my character makes a walk animation but if the walk animation is played the grenade throw animation could not be played at the same time
Thanks for your ideas LG Leonard
The Animation View - Animation Events video may be of help to you: http://www.vimeo.com/unity3d/videos
Answer by Noise crime · Jul 20, 2010 at 06:13 PM
Why not simply add an event to your throwing animation so it calls a function to trigger the throwing of the grenade at the right time? Far more precise than using a timer.
You'll have to 'copy' the animation if its imported in order to add an event. More details here.
Your answer
Follow this Question
Related Questions
The name 'Joystick' does not denote a valid type ('not found') 2 Answers
Get animation work 1 Answer
How do i know if a animation is finished or not ? 2 Answers
Problem with "stun"-timer after player is being hit 1 Answer
Is it possible to manipulate Mecanim state machine / blend trees from scripting? 0 Answers