Home   Help Search Login Register  

Author Topic: handguns for soldiers  (Read 979 times)

0 Members and 1 Guest are viewing this topic.

monoloth69

  • Guest
handguns for soldiers
« on: 23 Mar 2004, 05:10:42 »
I am working on a set of Infantry units for Urban areas, and I am having trouble getting them to be able to use handguns.  I have it defined correctly (I think)

#define WeaponNoSlot            0// dummy weapons
#define WeaponSlotPrimary      1// primary weapons
#define WeaponSlotSecondary   16// secondary weapons
#define WeaponSlotHandGun   2   // HandGun
#define WeaponSlotHandGunItem   32 // HandGun magazines
#define WeaponSlotItem         256// items
#define WeaponSlotBinocular   4096// binocular
#define WeaponHardMounted      65536

 then, for example, one of the units in the CfgVehicles section looks like this.......

                                class D_UrbanHSR: SoldierWB
                                {
                                               displayName="D Urban Heavy Soldier";
                                               model="\D_UrbanH\D_UrbanH.p3d";      
                                               sensitivity=1.25;
                                               accuracy=2.500000;
                                               attendant=1;
                                               nightVision=1;
                                               camouflage=0.750000;
                                               weaponSlots="1 +   16 + 2 *     4096 + 10 *          256";
                                               weapons[]={"G36a","Beretta","NVGoggles","Throw","Put"};
                                               magazines[]={"G36aMag","G36aMag","G36aMag","G36aMag","G36aMag","G36aMag","BerettaMag","BerettaMag","HandGrenade","HandGrenade"};          
                                 };

but i cant seem to get him to get a handgun of anykind from the ammocrates, or use the one I gave him..

Can anybody lend a helping cpp hand???????????

DeadMeatXM2

  • Guest
Re:handguns for soldiers
« Reply #1 on: 23 Mar 2004, 13:37:49 »
Your code is actually wrong, it should read:

Code: [Select]
weaponSlots="1 +  16 + 2 + 2 *    4096 + 10 *          256 + 4 *          32";

However, since handgun support has been built into the BIS units as standard, it is best to simply leave this code out altogether.

monoloth69

  • Guest
Re:handguns for soldiers
« Reply #2 on: 23 Mar 2004, 19:16:54 »
Thanks a million DeadMeat,

            Knew I was doing something simple very wrong.  These are custom units, made from scratch, so I guess they arent actually considered BIS units, so maybe thats why they wouldnt do it automatically.  Now all i have to do is finish the model, and get it textured.

Also, BTW Deadmeat, thanks a million for your ammocrate.sqs that you and BackOff made, I have modified it for every new set of weapons that come out so that I can keep my guns straight!!!
Just wanted to get my thanks in to you guys!