Announcement

Collapse
No announcement yet.

trying to make the shieldgun's primaryfire altfire

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

    trying to make the shieldgun's primaryfire altfire

    no matter what i wanna do with a weapon i can't ever figure out where the hell i'm supposed to put the friggin code... what i wanna do is make the shieldgun's primary fire become the altfire, but the altfire stay the same (so that it's not a shield 'gun' anymore, it's just a shield )
    what i gots:
    Code:
    function ModifyPlayer(Pawn P)
    {
         local Weapon W;
         local xPawn x;
         x = xPawn(P);
         W = Weapon(P.FindInventoryType(class'ShieldGun'));
         W.FireModeClass[0] = class'XWeapons.ShieldAltFire';
    }
    i know it probably shouldn't be in modifyplayer, but i can't think of anywhere else to put it, perhaps gamerules? help please... could someone tell me where and what to do, then tell me why what i did wouldn't work. thanks bunches.

    #2
    I would read through the shield gun class. There may be more specific code fo each firetype. I would probably subclass the Shieldgun and change the fire mode in the subclasses default. Then you can use a mutator to replace the XWeapons.ShieldGun with your MyMod.ShieldGun.

    ian

    Comment


      #3
      k... i'm tryin that, buuuut...
      when i try to change the requiredequipment and i use
      x.requiredequipment[0] = class'MyMod.Shield';
      x.requiredequipment[1] = None;
      it tells me type mismatch in = ...

      Comment


        #4
        lol... like a million people asked that question...
        guess i wont get an answer
        *sets off to find a tut*

        Comment


          #5
          You don't need to set the required equipment, look for the CheckReplacement function in a Mutator and set that up to replace all shiled guns with your shield gun.

          ian

          Comment

          Working...
          X