The whole thing is that i want to make a reload code for my ammo.
Example Code
var ammo1:GUITexture;
var ammo2:GUITexture;
var ammo3:GUITexture;
var AMMO = 3
function FixedUpdate()
{
switch(AMMO)
{
case 1:
guiTexture.texture = ammo1;
break;
}
case 2:
guiTexture.texture = ammo2;
break;
}
case 3:
guiTexture.texture = ammo3;
break;
case 4:
//return to case 1.
break;
}
if(Input.GetButton("Fire1")
ScriptName.AMMO -= 1;
}