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.

UE2 - UT2kX Removing Assault Rifle/ShieldGun

Discussion in 'Mapping' started by Median12, Aug 31, 2015.

  1. Median12

    Median12 Mapper

    Joined:
    Sep 18, 2012
    Messages:
    129
    Likes Received:
    3
    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: Aug 31, 2015
  2. meowcat

    meowcat take a chance

    Joined:
    Jun 7, 2001
    Messages:
    800
    Likes Received:
    1
    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;
    }
    
     
  3. Median12

    Median12 Mapper

    Joined:
    Sep 18, 2012
    Messages:
    129
    Likes Received:
    3
    Thanks Meowcat, I thought so.
     
  4. Sir_Brizz

    Sir_Brizz Administrator Staff Member

    Joined:
    Feb 3, 2000
    Messages:
    25,992
    Likes Received:
    74
    If you are creating a custom pawn, you can override the DefaultInventory.
     
  5. gopostal

    gopostal Active Member

    Joined:
    Jan 19, 2006
    Messages:
    854
    Likes Received:
    47
    If you don't solve this hit me up and I'll script you something to embed in the map.
     
  6. Median12

    Median12 Mapper

    Joined:
    Sep 18, 2012
    Messages:
    129
    Likes Received:
    3
    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.
     

Share This Page