Variables 'ammo' 'clip' problem.
Posted: Wed May 09, 2007 12:29 pm
I have a variable called 'W2000SniperClip' and a variable called 'ammo', atm the gun starts with 7 bullets, create actor, ammo =7, and after the 7 bullets are used, empty 'ammo = 0' you reload 'key down' and get 7 bullets again 'ammo=7'.
My problem is i also want to have 3 clips 'W2000SniperClip = 3' but I dont want the gun to reload and be able to shoot if 'W2000SniperClip = 0'
I tried this code for reload, it accepts the code, but its not working, the code used to be just 'ammo =7;', now it is this:
Any help GE wise ones?
Thanks,
scythe
My problem is i also want to have 3 clips 'W2000SniperClip = 3' but I dont want the gun to reload and be able to shoot if 'W2000SniperClip = 0'
I tried this code for reload, it accepts the code, but its not working, the code used to be just 'ammo =7;', now it is this:
- Code: Select all
W2000SniperClip - 1;
if (W2000SniperClip == 0)
{
(ammo = 0);
}
else if (W2000SniperClip >= 0)
{
(ammo = 7);
}
Any help GE wise ones?
Thanks,
scythe