x


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

more ▼

asked Jul 20, 2010 at 05:43 PM

Leonard Kropf gravatar image

Leonard Kropf
123 38 29 40

The Animation View - Animation Events video may be of help to you: http://www.vimeo.com/unity3d/videos

Jul 20, 2010 at 07:36 PM Julian Glenn
(comments are locked)
10|3000 characters needed characters left

1 answer: sort voted first

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.

more ▼

answered Jul 20, 2010 at 06:13 PM

Noise crime gravatar image

Noise crime
1.8k 42 39 58

(comments are locked)
10|3000 characters needed characters left
Your answer
toggle preview:

Up to 2 attachments (including images) can be used with a maximum of 524.3 kB each and 1.0 MB total.

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here

By RSS:

Answers

Answers and Comments

Topics:

x8971
x6636
x562
x430

asked: Jul 20, 2010 at 05:43 PM

Seen: 912 times

Last Updated: Jul 20, 2010 at 09:11 PM