Weapon Replacement for DeathMatch

  • 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.

[FU2]SpawnKiller

New Member
Sep 13, 2003
26
0
0
www.1ultimatesnipingzone.com
How can I reset this to run from a bool so that I can pick and choose which rifle to use??

Code:
function ModifyPlayer(Pawn Other)
{
	DeathMatchPlus(Level.Game).GiveWeapon(Other,"SniperRifles_v102.ZarkAssaultRifle");

	if ( NextMutator != None )
		NextMutator.ModifyPlayer(Other);
}

This is what I am using else where but with the DeathMatchPlus(Level.Game).GiveWeapon I am unsure how to recode this

Code:
    	if (Other.IsA('SniperRifle') && bGiveCustomSniperRifle )
		{
		ReplaceWith(Other,"SniperRifles_v102.CustomSniperRifle");
		return false;
		}

		if (Other.IsA('SniperRifle') && bGiveZarkAssaultRifle )
		{
		ReplaceWith(Other,"SniperRifles_v102.ZarkAssaultRifle");
		return false;
		}


THANKS
 

[FU2]SpawnKiller

New Member
Sep 13, 2003
26
0
0
www.1ultimatesnipingzone.com
Got it Working

this works with an ini file

Code:
	bUseCustomSniperRifle,  //CustomSniperRifle
	bUseZarkAssaultRifle,   //ZarkAssaultRifle
	bUseCustomWeaponMut;	//Toggle for Custom Weapon Mutator








function ModifyPlayer(Pawn Other)
{
	if ( bUseCustomWeaponMut )
	{
		If ( bUseCustomSniperRifle )
		{
			DeathMatchPlus(Level.Game).GiveWeapon(Other,"SniperRifles_v102.CustomSniperRifle");
			return;
		};

		If ( bUseZarkAssaultRifle )
		{
			DeathMatchPlus(Level.Game).GiveWeapon(Other,"SniperRifles_v102.ZarkAssaultRifle");
			return;
		}

	}


	if ( NextMutator != None )
		NextMutator.ModifyPlayer(Other);
}