- Home /
Animation script with is.grounded help
Hi I have this animation script,
var .isgrounded : boolean = true;
function Update()
{
if(.isgrounded = true)
{
animation.CrossFade ("Walk");
}
}
{
if(.isgrounded = false)
{
animation.CrossFade ("Jump")
}
}
I made it my self(That might be the problem). And what I'm trying to say is, if the player is on the ground play the Walk animation. But if the player in not touching the ground play the Jump animation. Now Unity won't even play my game now, it says there is a compiler error. This little script has been giving me a ton of trouble. Thanks for looking!
-Rov
Your answer
Follow this Question
Related Questions
The name 'Joystick' does not denote a valid type ('not found') 2 Answers
fireball animation 2 Answers
Is it possible to manipulate Mecanim state machine / blend trees from scripting? 0 Answers
Created Animations only play half within Animator 0 Answers
Resetting a combo attack chain if next attack did not occur in time 1 Answer