UE3 - UT3 Help with UT3 rocket launcher dual 6 shot

  • Two Factor Authentication is now available on BeyondUnreal Forums. To configure it, visit your Profile and look for the "Two Step Verification" option on the left side. We can send codes via email (may be slower) or you can set up any TOTP Authenticator app on your phone (Authy, Google Authenticator, etc) to deliver codes. It is highly recommended that you configure this to keep your account safe.

ZippyDSMlee

New Member
May 11, 2006
386
0
0
Yes the great bane to grammar nazis and competent coders everywhere has returned!

With UT4 on the horizon I wanted to start back on code nawing UT3 and zippyfing(zanny/lulzy) the weapons.


I can barely understand anything but I have managed to grasp a few operators and such even go the UT3 rocket launcher to load up 6-13 shots but I've hit a road block making it load up ammo on both fire modes.

I've found the code bits that control which fire mode gets to load up.

Code:
simulated function WeaponFireLoad()
{
//zippy marker   part of main load code
	SetCurrentFireMode(1);
	IncrementFlashCount();

	if (Role == ROLE_Authority)
	{
		FireLoad();
	}

	PlayFiringSound();
	InvManager.OwnerEvent('FiredWeapon');
	GotoState('WeaponPlayingFire');

	//We've expended all our ammo, make sure the ammo geometry is hidden from view
	if (AmmoCount == 0 && Instigator.IsHumanControlled() && Instigator.IsLocallyControlled())
	{
		HideRocket('MackRocketScale', true);
		bIsAnyAmmoHidden = true;
	}
}

Under simulated state WeaponLoadAmmo

Code:
   	simulated function BeginFire(byte FireModeNum)
	{
	//zippy marker
		if (FireModeNum == 0)
		{
			LoadedFireMode = ERocketFireMode((int(LoadedFireMode) + 1) % RFM_Max);
			WeaponPlaySound(AltFireModeChangeSound);
		}

		Global.BeginFire(FireModeNum);
	}

	simulated function TimeWeaponFiring( byte FireModeNum )
	{
	//zippy marker  main load code
		SetTimer( GetFireInterval(1) , false, 'RefireCheckTimer' );
	}






		// If we have released AltFire - Just fire the load
		//zippy marker   main load code
		if ( !StillFiring(1) )
		{
			if ( LoadedShotCount > 0 )
			{
				// We have to check to insure we are in the proper state here.  StillFiring() may cause
				// bots to end their firing sequence.  This will cause and EndFire() call to be made which will
				// also fire off the load and switch to the animation state prematurely.

				if ( IsInState('WeaponLoadAmmo') )
				{
					WeaponFireLoad();
				}
			}
			else
			{
				GotoState('Active');
			}
		}




simulated function AddProjectile()
	{
		WeaponPlaySound(AltFireSndQue[Clamp(LoadedShotCount, 0, AltFireSndQue.Length - 1)]);

		// Play the que animation
		if ( Instigator.IsFirstPerson() && (LoadedShotCount < 13) )
		{
			PlayWeaponAnimation( LoadUpAnimList[LoadedShotCount], AltFireQueueTimes[LoadedShotCount]);

		}
		//zippy marker    main load code
		TimeWeaponFiring(1);
	}

More specifically

Code:
	SetCurrentFireMode(1);


Code:
	SetTimer( GetFireInterval(1) , false, 'RefireCheckTimer' );


Code:
	TimeWeaponFiring(1);

Code:
		if ( !StillFiring(1) )


And yes I have the array set on both the primary and alt fire mode so its not missing that at least.


Heres my current code file http://jmp.sh/VMMCx0p

And lastly in "FireModeNum ==" calls can you use things like >= or ^ or |to have it phrase both modes? I know != excludes whatever mode is used at least.

I am much better at textures than coding ><

http://zippydsmlee.deviantart.com/art/UPDATE-Zippy-labs-Hellfire-Cannon-357259335

http://img.photobucket.com/albums/v632/zippydsmlee/punisher-final-zippylabs-ut3_zps9e02f112.jpg


Thanks for any and all info it helps it really dose even if its a waste on my idiot single celled brain. LOL