Quantcast
Channel: Latest Questions by brandonhotdo
Viewing all articles
Browse latest Browse all 108

Random value for if statement

$
0
0
i have some code and i'm not sure on how to get a varaible into a if statement. #pragma strict public var number; function Start () { var number = Random.Range(2,2); } var myTimer : float = 10.0; function Update () { if (var number == 2){ transform.position.y = 9.320176; transform.position.z = 0; transform.position.x = 0; } }

Viewing all articles
Browse latest Browse all 108

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>