1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.
  2. 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.

Combining Weapons Mutators...

Discussion in 'Programming' started by Gnam, Oct 22, 2004.

  1. Gnam

    Gnam New Member

    Joined:
    Feb 13, 2002
    Messages:
    515
    Likes Received:
    0
    OK, I allready have a host of custom weapons which can be played all in one mutator, but I want to split every weapon into it's own mutator so you can mix and match and have full customizability. The problem is, when I combine mutators, one will work and the rest will be disabled. Right now the code I'm using for the individual mutators is basically copy and paste of the MutUseSniperRifle mutator in the UTClassic package of 2k4. IE:

    Code:
    function bool CheckReplacement( Actor Other, out byte bSuperRelevant )
    {
    	local int i;
    	local WeaponLocker L;
    
    	bSuperRelevant = 0;
        if ( xWeaponBase(Other) != None )
        {
    		if ( xWeaponBase(Other).WeaponType == class'XWeapons.MiniGun' )
    			xWeaponBase(Other).WeaponType = class'GWTWeapons.ProMiniGun';
    	}
    	else if ( LinkAmmoPickup(Other) != None )
    		ReplaceWith( Other, "GWTWeapons.ProMiniGunAmmoPickup");
    	else if ( WeaponLocker(Other) != None )
    	{
    		L = WeaponLocker(Other);
    		for (i = 0; i < L.Weapons.Length; i++)
    			if (L.Weapons[i].WeaponClass == class'MiniGun')
    				L.Weapons[i].WeaponClass = class'ProMiniGun';
    		return true;
    	}
    	else
    		return true;
    	return false;
    }
    
    Is there a way to combine seperate checkreplacement-based mutators without having them cancel eachother out? Thanks in advance for any help.
     
  2. [SAS]Solid Snake

    [SAS]Solid Snake New Member

    Joined:
    Jun 7, 2002
    Messages:
    2,633
    Likes Received:
    0
    What you should have done here is make the weapons replace other weapons defined in a mutator config.
     
  3. Gnam

    Gnam New Member

    Joined:
    Feb 13, 2002
    Messages:
    515
    Likes Received:
    0
    hmm... maybe I should just expect players to use Worm2k4 if they want that much customization. My time would be better spent on other features.
     

Share This Page