Announcement

Collapse

The Infinity Blade Forums Have Moved

We've launched brand new Infinity Blade forums with improved features and revamped layout. We've also included a complete archive of the previous posts. Come check out the new Infinity Blade forums.
See more
See less

weapon conditions

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

  • weapon conditions

    How the hell do i get the current weapons name that the player is holding, iv looked through the code and searched and cannot find one instance where this happens.

    Im inside a class that extends weaponfire ( its a modified version of instantfire ) and i want to be able to do something like this

    Code:
    case ( Weapon )
        {
              AssaultRifle:
                   stuff;
                   break;
    
              MachineGun:
                   morestuff;
                   break;
    
              default:
                   otherstuff;
                   break;
        }

  • #2
    Would all of the weapons you would cycle through be your own?

    Comment


    • #3
      What I mean is that if you are extending weaponfire, you wouldnt be able to easily call it from any "stock" weapons, as they already point to a given weapon fire class.

      you COULD use if statements instead of a switch like:

      if(Weapon.IsA('AssaultRifle'))
      some stuff;
      if(Weapon.IsA...

      Comment


      • #4
        Heh, I had to do this for my smashTV mod that I made..

        I think I gave up, but I was close in using the

        Pawn.FindInventoryType(class DesiredClass) function.

        Try Pawn.Weapon as well (returns a 'weapon' variable for the weapon the pawn is currently using I believe)

        Comment

        Working...
        X