What is wrong in this script?
var animation_bool : boolean ;
var time = 0;
function Update(){
wait = Time.time;
if(Time.time>=wait+25){
StartCoroutine;
}
Coroutine{ (animation_bool == true);
{
animation.Play("hit");
}
if(Input.GetButtonDown("Dumkp5"))
{
animation_bool = true;
}
if(Input.GetButtonUp("Dumkp5"))
{
animation_bool = false;
}
}
}
Well, almost everything is wrong in this script! wait isn’t declared anywhere, and you assign Time.time to it, then compare to Time.time+25 - this will always be false; StartCoroutine requires parameters (the coroutine name), and Coroutine is a type, not the coroutine declaration. It would be better to explain what you’re trying to do, so that someone could show the right path. Alternatively, you could read StartCoroutine to learn from the examples how to use coroutines (but be aware that coroutines are a somewhat advanced topic, and aren’t recommended for beginners).