I'm no addon maker. Actually, I've never really made a real addon. I've just depbo'd some addons, and read a little on the subject. What I want to do should be fairly simple, but I can't seem to get the cpp right. All I want to do is make a copy of the laser designator weapon, but change its name to "Video Camera", and its ammo name to "Camera Battery". Then I want to make a civillian2 on the resist side named "Media Crew", equipped with the camera and its ammo. I don't want the crew to have a primary weapon slot, or any extra ammo slots other than the 6 required for the camera battery. Bino slots are fine. I know this should be easy, but I can't get it to work. If someone would look at my cpp and tell me what I'm doing wrong, I would be much obliged!
Below is my cpp file. Thanks for the help! ;)
// some basic defines
#define TEast 0
#define TWest 1
#define TGuerrila 2
#define TCivilian 3
#define TSideUnknown 4
#define TEnemy 5
#define TFriendly 6
#define TLogic 7
#define true 1
#define false 0
#define DefaultManWeapons Throw,Put
// type scope
#define private 0
#define protected 1
#define public 2
#define WeaponNoSlot 0// dummy weapons
#define WeaponSlotPrimary 1// primary weapons
#define WeaponSlotSecondary 16// secondary weapons
#define WeaponSlotItem 256// items
#define WeaponSlotBinocular 4096// binocular
#define WeaponHardMounted 65536
class CfgPatches
{
class media
{
units[] = {mediaman};
weapons[] = {LaserGuidedBombLauncher, LaserDesignator};
requiredVersion = 1.26;
};
};
class CfgAmmo
{};
class CfgWeapons
{
class Default{};
class LaserDesignatorBase: Default{}:
class LaserDesignator: LaserDesignatorBase{}:
class VidCamera: LaserDesignator
{
displayName="Video Camera";
displayNameMagazine="Camera Battery";
shortNameMagazine="Camera Battery";
opticsZoomMin=0.05;
opticsZoomMax=0.35;
};
};
class CfgVehicles
{
class All{};
class AllVehicles: All {};
class Land: AllVehicles{};
class Man: Land{};
class Civilian: Man{};
class Civilian2: civilian{};
class MediaCrew: civilian2
{
displayName="Media Crew";
side=TGuerrila;
nightVision=1;
moves="CfgMovesMC";
weaponSlots="16 + 2 * 4096 + 6 * 256";
scope=2;
weapons[]={VidCamera, DefaultManWeapons};
magazines[]=
{
VidCameraAmmo
};
};
};