I'm using an If/Else statement, Is there a way to say or? for example:
</p>
<p>if(Input.GetButton("Reload") // I want to say or BulletsFired >= 30)</p>
<p>
I'm using an If/Else statement, Is there a way to say or? for example:
</p>
<p>if(Input.GetButton("Reload") // I want to say or BulletsFired >= 30)</p>
<p>
Use this:
function Update() {
if (Input.GetButtonDown ("Fire1") || bulletsFired >= 30) {
Reload() //This would be a function in your code called 'Reload' that reloaded your weapon.
}
If you need further help, don't hesitate to ask here. There is a script reference here as well, which has proven itself invaluable to me in coding JS.