x


Animation Help!!!!!

Hello, A quick question.. how would i make it so that i can play two animations at the same time.. to go in to more detail When i hit the "W" key my walk animation activates and it moves forward so it looks like im walking but what i now want is the when im walking witht he animation still playing i want to be able to shoot my sniper.. the sniper i have is a bolt action sniper so when i shoot it reloads straight away and then when the shoot/reload animation is finished i want the walking animation to keep going :/ i have some code which im currently using

function Update()

{

if(Input.GetKey("W"))

 animation.Play("Walk");

else if(Input.GetKey("mouse 0"))

    animation.Play("Shoot/Reload");

}

So if anybody could help that would be great

Thanks..

more ▼

asked Nov 06 '11 at 08:52 PM

benjimazza gravatar image

benjimazza
102 23 34 38

(comments are locked)
10|3000 characters needed characters left

1 answer: sort voted first

I don't think you can't play 2 animation at same time on same object...But I think if your character has bones then you can add walk animations to legs and shoot animation to hands... but you must make 2 scripts. Script to legs:

if(Input.GetKey("W"))
animation.Play("Walk");

Script for hands:

If(Input.GetKey("mouse 0"))
animation.Play("Shoot/Reload");

I'm not sure will it work but you should try it.

more ▼

answered Nov 06 '11 at 11:09 PM

RockDude gravatar image

RockDude
101 17 22 27

This was a good idea but it didn't work :(

Nov 07 '11 at 04:19 PM benjimazza
(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:

x3930
x563
x26

asked: Nov 06 '11 at 08:52 PM

Seen: 859 times

Last Updated: Nov 07 '11 at 04:19 PM