well, i wrote out a COG that should reload the weapon, and it works fine except sometimes after it's done reloading it doesn't do anything, and sometimes when it's done it shoots repeatedly. i'm using a call statement to activate it after (clip) number of shots have been fired, here's the block of code:
reload:
DeactivateWeapon( player, mode );
wstop = 1;
PlayKey(player, dismountAnim, 1, 0x38);
PlaySoundThing(reload, player, 1.0, -1.0, -1.0, 0x80);
sleep(getsoundlen(reload));
ActivateWeapon( player, fireWait/powerBoost, mode );
wstop = 0;
ActivateWeapon( player, fireWait/powerBoost, mode );
clip = 15;
wstop = 0;
PlayKey(player, mountAnim, 1, 0x38);
i made it so the weapon can only fire when wstop = 0...so why does it loop sometimes and not do anything other times? anyone know a better way of disabling and enabling the weapon?
reload:
DeactivateWeapon( player, mode );
wstop = 1;
PlayKey(player, dismountAnim, 1, 0x38);
PlaySoundThing(reload, player, 1.0, -1.0, -1.0, 0x80);
sleep(getsoundlen(reload));
ActivateWeapon( player, fireWait/powerBoost, mode );
wstop = 0;
ActivateWeapon( player, fireWait/powerBoost, mode );
clip = 15;
wstop = 0;
PlayKey(player, mountAnim, 1, 0x38);
i made it so the weapon can only fire when wstop = 0...so why does it loop sometimes and not do anything other times? anyone know a better way of disabling and enabling the weapon?