Re: animation stacking?

I have a question over here. I have a key ‘e’, and a ‘die’ animation. When press ‘e’, die animation is played by this character. But I can only press ‘e’ after the ‘die’ animation has played finish. Is it possible for me to stack the animation ‘die’, without having to wait finish the whole animation length.
Thanks.

function Update()
{
	property();
}

function property()
{
	if(Input.GetKeyDown(KeyCode.E))
	{
		var die = animation["die"];
		animation.Play("die");
		die.wrapMode = WrapMode.Once;
	}
}

Hello!

you could use a flag to know if the use has pressed the “e” key, and make a logic and with Unity - Scripting API: Animation.isPlaying

that way you could “queue” que key :stuck_out_tongue:

hope it helps! :wink:

ok. thanks.