- Home /
Random Function Start()?
Hello. I have two things being called in my function at the start, is there anyway I can have it be random has to which one is called?
function Start() { rigidbody.velocity = Vector3(0,0,30); rigidbody.velocity = Vector3(30,0,0); }
Comment
Best Answer
Answer by Zib Redlektab · Nov 24, 2010 at 11:29 PM
Wouldn't this work?
if (Random.value >= 0.5) {
//option 1
} else {
//option 2
}