Page 1 of 1

Can't Get my Enforcer Mod Automatically!!

Posted: Thu Apr 11, 2013 11:44 am
by Spectra
I created a Enforcer Mod with a new name == Deagle

Now I am facing a problem. The Problem is I cant get my Deagle when I spawn at start or Respawn after Death Automatically.
However the other Weapons are perfectly Replaced of its own type.

Comparing to NW2X,NW3 the player gets W.R.E automatically when spawn at start or after Death.
Same way I also want to do the Same thing.

Here are my Codes which Replaces Botpack Weapons with my Weapons.

Code: Select all

class KissAssMute expands Mutator;

var bool binitialized;

function bool CheckReplacement(Actor Other, out byte bSuperRelevant)
{
       if (Other.IsA('enforcer') && !Other.IsA('Deagle'))        
     {
          ReplaceWith(Other, "New-Weapons.Deagle");
          return False;
     }
      if (Other.IsA('UT_Jumpboots') && !Other.IsA('Darkboots'))        
     {
          ReplaceWith(Other, "New-Weapons.DarkBoots");
          return False;
     }
	if (Other.IsA('MedBox') && !Other.IsA('DarkMedBox'))        
     {
          ReplaceWith(Other, "New-Weapons.DarkMedBox");
          return False;
     }

      if (Other.IsA('Armor2') && !Other.IsA('DarkArmor'))        
     {
          ReplaceWith(Other, "New-Weapons.DarkArmor");
          return False;
     }
	if (Other.IsA('ThighPads') && !Other.IsA('DarkThighPads'))        
     {
          ReplaceWith(Other, "New-Weapons.DarkThighPads");
          return False;
     }

      if (Other.IsA('UDamage') && !Other.IsA('WLDamage'))        
     {
          ReplaceWith(Other, "WeaponLord.WLDamage");
          return False;
     }

      if (Other.IsA('UT_Biorifle') && !Other.IsA('Biohazardgun'))        
     {
          ReplaceWith(Other, "WeaponLord.Biohazardgun");
          return False;
     }

      if (Other.IsA('ShockRifle') && !Other.IsA('DarkShockRifle'))       
     {
          ReplaceWith(Other, "New-Weapons.DarkShockRifle");
          return False;
     }
	if (Other.IsA('ShockCore') && !Other.IsA('DarkShockCore'))        
     {
          ReplaceWith(Other, "New-Weapons.DarkShockCore");
          return False;
     }

      if (Other.IsA('PulseGun') && !Other.IsA('MeatBurner'))        
     {
          ReplaceWith(Other, "New-Weapons.MeatBurner");
          return False;
     }
	if (Other.IsA('Pammo') && !Other.IsA('BurnerAmmo'))        
     {
          ReplaceWith(Other, "New-Weapons.BurnerAmmo");
          return False;
     }

      if (Other.IsA('Ripper') && !Other.IsA('DarkCutter'))        //slot 2
     {
          ReplaceWith(Other, "New-Weapons.DarkCutter");
          return False;
     }
	if (Other.IsA('BladeHopper') && !Other.IsA('DarkCutterAmmo'))        
     {
          ReplaceWith(Other, "New-Weapons.DarkCutterAmmo");
          return False;
     }

      if (Other.IsA('Minigun2') && !Other.IsA('MiniPulse'))        
     {
          ReplaceWith(Other, "New-Weapons.MiniPulse");
          return False;
     }
	if (Other.IsA('miniammo') && !Other.IsA('minishells'))        
     {
          ReplaceWith(Other, "New-Weapons.minishells");
          return False;
     }

      if (Other.IsA('UT_Flakcannon') && !Other.IsA('RockCannon'))        
     {
          ReplaceWith(Other, "New-Weapons.RockCannon");
          return False;
     }
	if (Other.IsA('FlakAmmo') && !Other.IsA('RockAmmo'))        
     {
          ReplaceWith(Other, "New-Weapons.RockAmmo");
          return False;
     }

      if (Other.IsA('UT_Eightball') && !Other.IsA('RocketM8Launcher'))        
     {
          ReplaceWith(Other, "New-Weapons.RocketM8Launcher");
          return False;
     }
	if (Other.IsA('RocketPack') && !Other.IsA('M8_MissilePack'))        
     {
          ReplaceWith(Other, "New-Weapons.M8_MissilePack");
          return False;
     }
	if (Other.IsA('SniperRifle') && !Other.IsA('LaserSniper'))        
     {
          ReplaceWith(Other, "New-Weapons.LaserSniper");
          return False;
     }
	if (Other.IsA('BulletBox') && !Other.IsA('LaserSniperAmmo'))        
     {
          ReplaceWith(Other, "New-Weapons.LaserSniperAmmo");
          return False;
     }

      if (Other.IsA('WarheadLauncher') && !Other.IsA('SinRifle'))        
     {
          ReplaceWith(Other, "WeaponLord.SinRifle");
          return False;
     }

     return True;


}

defaultproperties
{
}
Is there something wrong in my codes.???
I know my Question sounds much Noobish but I am very new to all these Stuffs. :???:

Re: Can't Get my Enforcer Mod Automatically!!

Posted: Thu Apr 11, 2013 12:05 pm
by Feralidragon
The problem is not your code directly, but rather the way the game is programmed.
In NW3 I do the replacement differently (radically differently in fact) to be able to replace anything at all with no issues whatsoever, thus that's why it works there, however since your only problem is the enforcer alone right now, the easiest thing for you to do is to add a default property:

Code: Select all

defaultproperties
{
    DefaultWeapon=Class'New-Weapons.Deagle'
}

Re: Can't Get my Enforcer Mod Automatically!!

Posted: Thu Apr 11, 2013 4:26 pm
by Spectra
Yes it Really Worked.

TY very much for your Help!

I will never forget you.

Re: Can't Get my Enforcer Mod Automatically!!

Posted: Thu Apr 11, 2013 4:40 pm
by heliumcat
Care to share it with us when it's done? :satan:

I could use a super enforcer in my arsenal. :wink:

Re: Can't Get my Enforcer Mod Automatically!!

Posted: Thu Apr 11, 2013 5:04 pm
by Spectra
heliumcat wrote:Care to share it with us when it's done? :satan:

I could use a super enforcer in my arsenal. :wink:
Yes, y not??

When I will Finish everything, I will Publish it here.