[UT] Is it possible to make an arena mutator of an existing mutator ?

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

Zur

surrealistic mad cow
Jul 8, 2002
11,708
8
38
48
A guy I'm on contact with has a zark rifle mutator that works with UTPure. However, he would like an arena mutator which the current mutator doesn't have. Is it possible to make an arena mutator that will work in conjunction with the existing mutator ?

The following is what I've come up with so far. Ucc will complain because of references to outside packages. I've added the original mutator in the editpackages list and the arena mutator will compile fine but it doesn't seem to do anything when it's loaded in a practise session.

Code:
class ZM_SLRB_II_AR_Arena extends Arena;

function bool CheckReplacement(Actor Other, out byte bSuperRelevant)
{
	if ( Other.IsA('Weapon') && Other.class!=class'ZM_SLRB_II_ZarkAssaultRifleZ.ZM_SLRB_II_AssaultRifleZ'  )
	{
		ReplaceWith(Other, "ZM_SLRB_II_ZarkAssaultRifleZ.ZM_SLRB_II_AssaultRifleZ");
		return false;
	}
	else if ( Other.IsA('Ammo') && Other.class!=class'Botpack.BulletBox' )
	{
		ReplaceWith(Other, "Botpack.BulletBox");
		return false;
	}	
	return true;
}

function Class<Weapon> MyDefaultWeapon()
{
return class'ZM_SLRB_II_ZarkAssaultRifleZ.ZM_SLRB_II_AssaultRifleZ';
}

defaultproperties
{
}
 

Zur

surrealistic mad cow
Jul 8, 2002
11,708
8
38
48
Hmm, maybe my question seems clear as mud and there's certainly nothing special about the code snippet above. However, the question would be if it's possible to have a weapon mutator and an arena mutator that uses it in *two separate packages*.

I invite you to download Minigun Madness to see an example that uses two separate packages.

Edit : Added the modified Zark that works with UTPure and the original Zark used on clanbase.
 

Attachments

  • ZM_SLRB_II_ZarkAssaultRifleZ.zip
    13.8 KB · Views: 3
  • zark.zip
    9.3 KB · Views: 3
Last edited:

Zur

surrealistic mad cow
Jul 8, 2002
11,708
8
38
48
Problem solved ^^. I'd forgotten to modify the int file and got an infinite recursion error. I fixed this by adding a check for the weapon class when replacing weapons and also added a conditional statement at the end as the Zark Assault Rifle is derived from the classic Sniper Rifle.