|
OK, in my game I want the player to be able to use a powerup once per level. I'm guessing you do this with a Boolean, starting off with it being true, and being false afterwards. I can't get this to work, so here's my script. Where should I put the Boolean, and what should I write? Am I completely wrong altogether? var prefab : GameObject; function Update() { if(Input.GetButtonUp ("Fire1")) Instantiate( prefab, transform.position, Quaternion.identity ); } Thanks.
(comments are locked)
|
|
If we assume that the instantiation is the powerup, you can use the boolean as follows: Thanks, that's great.
Feb 24 '11 at 05:35 PM
Muzz 1
(comments are locked)
|
