Quickfire weapontry

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

    #1

    Quickfire weapontry

    Been messing with this for a couple days now, battlefield code has not been kind or even logical sometimes. I'm trying to set it up so a single weapon can fire two things. Well, let me go back...

    The original idea was to set up a weapon to fire without switching. Like Call of Duty 2 you hit the grenade button, it just throws a grenade without switching to it. Huge for gameplay, you could have quick access to certain impulsive waepons. I tried resetting the FireInput to different keys, tried sustained fire and automatically switching back, no luck.

    So the second idea, try adding an alt-fire weapon to one weapon. For example, hit the alt, or another key under the M16, fire the GL. Tried adding a GenericFireArm, nesting one, some of the old AltWeapon code from BFV. Tried making other weapons inside of it that would be accessed by alternate keys, again, no luck.


    So I'm out of ideas, and I'd appreciate ANY help or ideas people have on this one. I'm not trying to turn this game into Unreal, but my group has some great re-built classes and we're trying to incorporate these sort of quick-access defensive weapons as alternates to the main rifles to give each class a different emergency defense to be used in the middle of battle.
  • grolsche

    #2
    Re: Quickfire weapontry

    If you cant find the alt fire code, you should find an example within the vehicles which have weapons fired from both mouse buttons. Would give you the code to do it but I dont have BF2 installed right now. Any problems post back again and I'll give you the code.

    Comment

    • Darkoven

      #3
      Re: Quickfire weapontry

      Hey, thanks for posting.

      Looked in to that, but it seems like BF2 doesn't treat the soldier rundown like it does a vehicle with multiple genericfirearm objects. Moreover, the general soldier functions like weapon keys, action, sprint seem to all be hardcoded and unable to be dual-mapped to subfunctions within a particular weapon. It's too bad the GenericFireArm object is so limited, I was trying to add a collision object or even multiple barrels to a handheld weapon FireArm, but BF2 seems to think handheld GFAs are nothing more than projectile emittors with a mesh for looks only.

      Comment

      Working...