int bulletcount=0 local
Thats what I put in messages
IN the fire section:
player = GetSourceRef();
mode = GetSenderRef();
// Check that the player is still alive.
if(GetThingHealth(player) <= 3)
{
Return;
}
// Check Ammo - If we are out, autoselect best weapon.
// It should always use two energy cells, but -- as in DF --
// allow the last fire if there is only one left...
if(GetInv(player, 11) < 1.0)
{
PlaySoundThing(outSound, player, 1.0, -1, -1, 0x80);
if((GetAutoSwitch() & 1))
SelectWeapon(player, AutoSelectWeapon(player, 1));
Return;
}
// Get random aiming error
randVec = VectorSet((Rand()-0.1)*1, (Rand()-0.1)*1, 1.0);
SetPOVShake('0.0 -.003 0.0', '1.5 0.0 0.0', .05, 80.0);
dummy = FireProjectile(player, projectile, fireSound, 8, '0.01 0.1896 0.015', randVec, 1.0, 0x30, autoAimFOV, autoAimFOV*2);
// SetThingVel(dummy, vectorScale(GetThingVel(dummy), 0.01));
dummy = FireProjectile(player, projectile2, fireSound2, 8, '0.023 0.15 0.015', randVec, 1.0, 0x30, autoAimFOV, autoAimFOV*2);
// SetThingVel(dummy, vectorScale(GetThingVel(dummy), 0.01));
bulletcount = bulletcount+1;
ChangeInv( player, 11, -1.0 );
jkPlayPOVKey( player, povfireAnim, 1, 0x38 );
powerBoost = GetInv(player, 63);
ChangeFireRate(player, fireWait/powerBoost);
if(bulletcount >= 50)
{
key = PlayKey(player, reloadAnim , 0x1a);
}
Return;
No, nothing happened apart from the gun firing every single bullet in my inventory
And whats that bit about "set the bulletcount back to 0 when 50 shots has been reached".
If so how do I do that?
Code:
if(getThingFlags(source) & 0x8){
do her}
elseif(getThingFlags(source) & 0x4){
do other babe}
else{
do a dude}