Jump to content
Sign in to follow this  
zulu1

Johns_Nw41 EH Problem

Recommended Posts

This addon "Johns_Nw41.pbo" is giving me an {cfgvehicles/eventhandlers.scope} error.

There is no scope defined.

Or could the problem be with the event handlers?

class CfgVehicles

{

class All {};

class AllVehicles: All {};

class Land: AllVehicles {};

class LandVehicle: Land {};

class Tank: LandVehicle {};

class APC: Tank {};

class bmp: APC {};

class M2StaticMG: bmp {};

class Johns_Nw41 : M2StaticMG

{

side=0;

vehicleclass="Armored (JOHNS) Static";

picture="\Johns_Nw41\picture";

displayName="Nebelwerfer-41";

simulation="tank";

model="\Johns_Nw41\Johns_Nw41.p3d";

hasGunner = 1;

hasCommander=1;

gunnerOpticsColor[]={0.00000,0.00000,0.00000,0.5};

gunnerOpticsModel="empty";

cost=1000000;

crew="OfficerG";

gunnerAction="ManActjohns_NW41Gunner";

gunnerInAction="ManActjohns_NW41Gunner";

commanderAction="ManActjohns_NW41Commander";

commanderInAction="ManActjohns_NW41Commander";

armor=50;

getInAction="ManActGetInCar";

getOutAction="ManActGetOutCar";

armorStructural=10;

camouflage=1;

weapons[]={Johns_Nw41};

magazines[]={"15cm","15cm","15cm","15cm"};

icon="\Johns_Nw41\icon";

gunnerCanSee="3+20";

extCameraPosition[]={0,0.800000,-5};

threat[]={1,1,0.200000};

class Turret

{

gunAxis="osa hlavne";

turretAxis="osaveze";

soundServo[]={"\Johns_Nw41\traverse.ogg",0.02162,1.000000};

gunBeg="Usti hlavne";

gunEnd="Konec hlavne";

minElev=-9;

maxElev=30;

minTurn=-360;

maxTurn=360;

body="OtocVez";

gun="otochlaven";

};

};

class eventhandlers

{

init ="(_this select 0) exec ""\Johns_Nw41\scripts\destroyed.sqs""";

fired ="[_this select 0] exec ""\Johns_Nw41\scripts\smokeNW.sqs""";

hit ="[_this select 0,_this select 1] exec ""\Johns_Nw41\scripts\spark.sqs""";

};

};

class CfgNonAIVehicles

{

class ProxyWeapon{};

class ProxyJohns_Nw41: ProxyWeapon{};

};

class CfgVehicleActions

{

johns_NW41Gunner="CombatToMedic";

johns_NW41Commander="CombatToBinoc";

}

Thks,

Share this post


Link to post
Share on other sites

class CfgVehicles
{
class All {};
class AllVehicles: All {};
class Land: AllVehicles {};
class LandVehicle: Land {};
class Tank: LandVehicle {};
class APC: Tank {};
class bmp: APC {};
class M2StaticMG: bmp {};
class Johns_Nw41 : M2StaticMG
{
side=0;
vehicleclass="Armored (JOHNS) Static";
picture="\Johns_Nw41\picture";
displayName="Nebelwerfer-41";
simulation="tank";
model="\Johns_Nw41\Johns_Nw41.p3d";
hasGunner = 1;
hasCommander=1;
gunnerOpticsColor[]={0.00000,0.00000,0.00000,0.5}; 
gunnerOpticsModel="empty"; 
cost=1000000;
crew="OfficerG";
gunnerAction="ManActjohns_NW41Gunner";
gunnerInAction="ManActjohns_NW41Gunner";
commanderAction="ManActjohns_NW41Commander";
commanderInAction="ManActjohns_NW41Commander";
armor=50;
getInAction="ManActGetInCar";
getOutAction="ManActGetOutCar";
armorStructural=10; 
camouflage=1;
weapons[]={Johns_Nw41};
magazines[]={"15cm","15cm","15cm","15cm"};
icon="\Johns_Nw41\icon";

gunnerCanSee="3+20";
extCameraPosition[]={0,0.800000,-5};
threat[]={1,1,0.200000};

class Turret
{
gunAxis="osa hlavne";
turretAxis="osaveze";
soundServo[]={"\Johns_Nw41\traverse.ogg",0.02162,1.000000};
gunBeg="Usti hlavne";
gunEnd="Konec hlavne";
minElev=-9;
maxElev=30;
minTurn=-360;
maxTurn=360;
body="OtocVez";
gun="otochlaven";
};
[color="red"]};=> to delete[/color]
class eventhandlers
{

init ="(_this select 0) exec ""\Johns_Nw41\scripts\destroyed.sqs""";
fired ="[_this select 0] exec ""\Johns_Nw41\scripts\smokeNW.sqs""";
hit ="[_this select 0,_this select 1] exec ""\Johns_Nw41\scripts\spark.sqs""";


};

};

[color="Red"]};=> to add[/color]
class CfgNonAIVehicles
{
class ProxyWeapon{};
class ProxyJohns_Nw41: ProxyWeapon{};
};

class CfgVehicleActions
{
johns_NW41Gunner="CombatToMedic";
johns_NW41Commander="CombatToBinoc";
} 

The class eventhandlers is outside of Johns_Nw41 scope. And you must close the cfgvehicles section before opening the CfgNonAIVehicles

one.

Share this post


Link to post
Share on other sites

@ProfTournesol

Thanks for the quick reply, I'll try it ASAP. I'm sure it will work, you always have the right answer.

TY,

~Z~

Share this post


Link to post
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
Sign in to follow this  

×