Thanks, STT ... will do.
Below is my sorry mess. Again, flares load into the mortar, but neither the AI nor the player is able to fire them:
#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
// type scope
#define private 0
#define protected 1
#define public 2
class CfgPatches
{
class mortar2
{
units[] = {mortar2WF};
requiredVersion = 1.46;
};
};
class CfgAmmo
{
class Default{};
class Grenade: Default {};
class Flare: Grenade{};
};
class WeaponFireGun {};
class WeaponCloudsGun {};
class WeaponFireMGun: WeaponFireGun {};
class WeaponCloudsMGun: WeaponCloudsGun {};
class CfgWeapons
{
class Default{};
class GrenadeLauncher: Default{};
class Mortar2WF: GrenadeLauncher{
ammo=Flare;
count=200;
displayname="Flare"
displayNameMagazine="Flare";
shortNameMagazine="Flare";
initSpeed=100;
reloadTime=45;
magazineReloadTime=1;
optics = 0;
sound[]={"\M29Illum\RifleGrenade.ogg",4.000000,1};
};
};
class mortar2Clouds : WeaponCloudsMGun{
access=3;
cloudletGrowUp=0.050000;
cloudletFadeIn=0;
cloudletFadeOut=0.100000;
cloudletDuration=0.050000;
cloudletAlpha=0.300000;
cloudletAccY=0;
cloudletMinYSpeed=-100;
cloudletMaxYSpeed=100;
interval=0.020000;
size=0.000000;
sourceSize=0.020000;
};
class CfgVehicles
{
class All{};
class AllVehicles:All{};
class Land: AllVehicles{};
class LandVehicle: Land{};
class Tank: LandVehicle{};
class APC: Tank{};
class M113:APC{};
class M2StaticMG: M113{};
class mortar2WF: M2StaticMG
{
displayName="M-29 Illuminator";
model="\m29illum\mortar2";
cost=15000;
weapons[]={"Mortar2WF"};
magazines[]={"Mortar2WF"};
side=1;
crew="SoldierWB";
sensitivity=3;
hasdriver=0;
hasCommander=0;
hasgunner=1;
threat[]={1,0.100000,0.100000};
armor=20;
armorStructural=5.000000;
icon="kulomet.paa";
gunnerAction="ManActmortar2Gunner";
gunnerInAction="ManActmortar2Gunner";
class GunFire: WeaponCloudsMGun{};
class GunClouds: mortar2Clouds {};
class MGunFire: WeaponFireMGun {};
class MGunClouds: WeaponCloudsMGun {};
class Turret
{
gunAxis = "osahlavne";
turretAxis = "osaveze";
soundServo[]={Vehicles\gun_elevate2,db-30,1.0};
gunBeg = "usti hlavne";
gunEnd = "konec hlavne";
body = "OtocVez";
gun = "OtocHlaven";
minElev=-30;
maxElev=+90;
minTurn=-60;
maxTurn=+60;
};
class ComTurret
{
turretAxis="OsaVelitele";
gunAxis="OsaHlavneVelitele";
soundServo[]={"Vehicles\gun_elevate2",0.000316,1.200000};
gunBeg="usti hlavne";
gunEnd="konec hlavne";
minElev=-4;
maxElev=20;
minTurn=-360;
maxTurn=360;
body="OtocVelitele";
gun="OtocHlavenVelitele";
};
};
};
class CfgNonAIVehicles
{
class ProxyWeapon{};
class Proxytmortar2: ProxyWeapon{};
};
class CfgVehicleActions
{
mortar2Gunner="CombatToMedic";
};
class EventHandlers
{
fired = "if ((_this select 3) == ""Flare"") then {fire [""Grenadesmuzzle"",""Flare"",""Flare""]}";
Init = "fire [""Grenadesmuzzle"",""Flare"",""Flare""]";
};
};