Hey
I,m having trouble changing this script to a toggle instead of holding the input down. Can someone write this for me?
Here,s the script:
var aimTexture : GUITexture;
function Update() {
// Only enable aim texture when 'SwitchWeapons' button is not pressed.
// In this case I have used 'Shift' key for this.
if (Input.GetButton("SwitchWeapons"))
aimTexture.enabled = true;
else
aimTexture.enabled = false;
}
Sorry for the trouble, but I just started with scripting.