News UnrealEd Files Mods FragBU Liandri Archives
BeyondUnreal Forums

Go Back   BeyondUnreal Forums > Unreal Development > Coding

Reply
 
Thread Tools Display Modes
Old 22nd Oct 2004, 10:23 PM   #1
Gnam
Registered User
 
Gnam's Avatar
 
Join Date: Feb. 13th, 2002
Location: Yes, please.
Posts: 515
Combining Weapons Mutators...

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.
__________________
"Guns don't kill people, people do, and monkeys [if they have a gun.]"
- Eddie Izzard
Gnam is offline   Reply With Quote
Old 23rd Oct 2004, 12:17 AM   #2
[SAS]Solid Snake
Registered User
 
[SAS]Solid Snake's Avatar
 
Join Date: Jun. 7th, 2002
Location: New Zealand
Posts: 2,633
What you should have done here is make the weapons replace other weapons defined in a mutator config.
__________________
I make the impossible possible ... ... ... to some extent.

Digital Confectioners
[SAS]Solid Snake is offline   Reply With Quote
Old 24th Oct 2004, 02:02 AM   #3
Gnam
Registered User
 
Gnam's Avatar
 
Join Date: Feb. 13th, 2002
Location: Yes, please.
Posts: 515
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.
__________________
"Guns don't kill people, people do, and monkeys [if they have a gun.]"
- Eddie Izzard
Gnam is offline   Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -5. The time now is 11:27 PM.


Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2014, vBulletin Solutions, Inc.

Copyright ©1998 - 2012, BeyondUnreal, Inc.
Privacy Policy | Terms of Use
Bandwidth provided by AtomicGamer