Massassi Forums Logo

This is the static archive of the Massassi Forums. The forums are closed indefinitely. Thanks for all the memories!

You can also download Super Old Archived Message Boards from when Massassi first started.

"View" counts are as of the day the forums were archived, and will no longer increase.

ForumsCog Forum → changing ammo in COG
changing ammo in COG
2001-10-17, 12:52 PM #1
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?
2001-10-17, 1:46 PM #2
Download 'Death From Above' for JK from the JK Mods section. I think they implemented what you're trying to do, and you might be able to get an idea.

------------------
-There are easier things in life than finding a good woman, like nailing Jello to a tree, for instance

-Tazz
-There are easier things in life than finding a good woman, like nailing Jello to a tree, for instance

Tazz

↑ Up to the top!