UE2 - UT2kX Removing Assault Rifle/ShieldGun

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

Median12

Mapper
Sep 18, 2012
133
3
18
GB
meettomy.site
Hi,
I have got to the stage in my Mod, Occupant 17 where I have used BW Weapons and ZenCoders etc.. as the main weapons and I want to remove the standard UT2k4 Assault Rifle and ShieldGun from the Player.

I have an interesting way of spawning so He gets whichever weapon fits that level but as usual when you flick through your weapons you still have the UT2k4 Assault/ShieldGun....

Is there an easy way to remove these or do I have to change the xPawn values;

RequiredEquipment(0)="XWeapons.AssaultRifle" to " " or "none"?

I wondered if there was a noMut out there but I couldn't find anything relevant.
 
Last edited:

meowcat

take a chance
Jun 7, 2001
803
3
18
If I recall correctly, yes, you have to change those xPawn values. Here is a sample code excerpt from one of my mutators that removes that default inventory (edited to be more specific to your scenario, so it might need some testing to work...):
Code:
// in general do not replace weapon pickups, that can cause easily iterative failures
function bool CheckReplacement(Actor Other, out byte bSuperRelevant){
  local int i;

  bSuperRelevant = 0;

   // Turn off player loadouts for players / multiplayer bots only as indicated
  // by the Intelligence check
   if(xPawn(Other)!=None ){
        xPawn(Other).bNoDefaultInventory = true; // this setting appears to ignored,
        // DeathMatch.uc still calls AddDefaultInventory
       // from an Accept Inventory function, not sure
       // where that is called from
       // blank out the values
      for ( i=15; i>=0; i-- )
         if (xPawn(Other).RequiredEquipment[i] != "" )
                    xPawn(Other).RequiredEquipment[i]="";
      return true;
  }
  return true;
}
 

Sir_Brizz

Administrator
Staff member
Feb 3, 2000
26,020
83
48
If you are creating a custom pawn, you can override the DefaultInventory.
 

gopostal

Active Member
Jan 19, 2006
848
47
28
If you don't solve this hit me up and I'll script you something to embed in the map.
 

Median12

Mapper
Sep 18, 2012
133
3
18
GB
meettomy.site
Thanks gopostal.

I'll send you the link for the Alpha when it's vaguely finished and you can see what you can do.

I haven't uploaded anything yet as I am using various Texture packs and other interesting changes from the original UT2k4 game.

Thats a big enough file in itself.

I'll let you know.

It's basically to remove the AssaultRifle and Shield from the Player. All NPC's/Bots are AIscript or OSMT based so that's no problem.