Announcement

Collapse
No announcement yet.

Mutator, cannot Modify AssaultRifle (bug)

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • replied
    This in combination with the CheckReplacement() function (where I replace pickups) works! The ItemName thingy came in handy aswell. Thnx dudes!


    function string GetInventoryClassOverride(string InventoryClassName)
    {
    if ( InventoryClassName == "XWeapons.ShieldGun")
    InventoryClassName = "WeaponProMode.ShieldGunExt";
    }

    Leave a comment:


  • replied
    In your mutator, you chould have something like
    Code:
    function string GetInventoryClassOverride(string InventoryClassName) {
        if ( InventoryClassName == "XWeapons.AssaultRifle") {
              InventoryClassName = "myPackage.myAssaultRifle";
        }
        if ( NextMutator != None )
            return NextMutator.GetInventoryClassOverride(InventoryClassName);
        return InventoryClassName;
    }
    It will allow you to spawn with the modified weapon.
    If it still doesn't work, try spawning your item ingame with
    Code:
    summon myPackage.myAssaultRiflePickup

    Leave a comment:


  • replied
    Please elaborate on the "It Don't work" part. What exactly does it do and not do.

    Are you sure it is getting replaced properly? I have ran into this in that the mutator I made replaced all the weapon pickups in the game, but not the weapons I started with. Add "Itemname=AssaultRifleExt" to the defaultprops of assaultrifleExt so you can see exactly which weapon you have posession of.

    Leave a comment:


  • started a topic Mutator, cannot Modify AssaultRifle (bug)

    Mutator, cannot Modify AssaultRifle (bug)

    Hello dudes, i need some help. I'm working on this mutator and I am able to extend all weaponclasses except the AssaultRifle.
    Well I can extend it but changing the default props don't work.
    With all the other weapons I tried so far it works.

    Code example that does work:


    class MinigunExt extends Minigun;

    defaultproperties
    {
    FireModeClass(0)=MinigunFireExt
    }

    class MinigunFireExt extends MinigunFire;

    defaultproperties
    {
    DamageMin=100 //joke
    DamageMax=100 //joke
    }


    And now with the AssaultRifle wich does not work:


    class AssaultRifleExt extends AssaultRifle;

    defaultproperties
    {
    FireModeClass(0)=AssaultFireExt
    }


    class AssaultFireExt extends AssaultFire;

    defaultproperties
    {
    DamageMin=100 //joke
    DamageMax=100 //joke
    }


    Is the AssaultRifle somehow locked or what?
Working...
X