Milkman 1 Posted October 14, 2004 Well I have about had it with this addon I am working on, when it was first given to me its custom sounds worked fine but one day they magically stopped working. Config: Keep note of the cfgradio and cfgsounds <table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">#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 CanSeeAll 31 #define private 0 #define protected 1 #define public 2 class CfgPatches { class an12 { units[] = {"an12bp"}; weapons[] = {}; requiredVersion = 1.0; }; }; class CfgModels { class Default{}; class Air: Default{}; class Plane: Air{}; class an12bp: Plane { sectionsInherit="Plane"; sections[]= { "vrtule staticka", "vrtule blur" }; }; }; class CfgVehicles { class All {}; class AllVehicles : All {}; class Air : AllVehicles {}; class Plane : Air {}; class A10 : Plane {}; class Cessna : A10 {}; class an12bp : A10 { side=0; vehicleclass="Air"; displayName="An-12 BP"; model="\An12\an12bp.p3d"; maxSpeed=550; armor=85; elevatorSensitivity = 3.2; aileronSensitivity = 0.35; noseDownCoef = 2.3; nameSound="plane"; gearRetracting=1; weapons[]={}; magazines[]={}; driverAction="ManActCessnaPilot"; gunnerAction="ManActCessnaPilot"; cargoAction[]={"ManActCessnaCargo"}; soundEngine[]={"\an12\an12_engine",0.316228,1}; soundEnviron[]={"Objects\noise",0.001000,1.000000}; soundServo[]={"Vehicles\gun_elevate",0.010000,0.400000}; transportSoldier=60; crew="SoldierEPilot"; HasGunner=0; ejectSpeed[]={0,0,0}; class UserActions { class OpenRamp { displayName="Open Ramp"; position="ramp switch"; radius=4; condition="this animationphase ""Rbht"" < 0.4"; statement="[this] exec {\an12\Copen.sqs}"; }; class CloseRamp { displayName="Close Ramp"; position="ramp switch"; radius=4; condition="(this animationphase ""Rbht"" >=0.4)&&(this animationphase ""Slope"" < 0.1)"; statement="[this] exec {\an12\Cclose.sqs}"; }; class DownSlope { displayName="Down Slope"; position="ramp switch"; radius=4; condition="(this animationphase ""Slope"" < 0.1)&&(this animationphase ""Rbht"" >=0.9)"; statement="[this] exec {\an12\Sopen.sqs}"; }; class UpSlope { displayName="Up Slope"; position="ramp switch"; radius=4; condition="this animationphase ""Slope"" >=0.1"; statement="[this] exec {\an12\Sclose.sqs}"; }; }; class ViewPilot { initFov=0.7; minFov=0.4; maxFov=0.9; initAngleX=0; minAngleX=-20; maxAngleX=20; initAngleY=0; minAngleY=-120; maxAngleY=120; }; animated=1; class Animations { class Rbht { type="rotation"; animPeriod=2.5; selection="bht"; axis="osa bht"; angle0=0; angle1=0.3; }; class Rbhr { type="rotation"; animPeriod=2.5; selection="bhr"; axis="osa bhr"; angle0=0; angle1=1.4; }; class Rbhl { type="rotation"; animPeriod=2.5; selection="bhl"; axis="osa bhl"; angle0=0; angle1=-1.4; }; class Fg1 { type="rotation"; animPeriod=3; selection="Fg1"; axis="osa Fg1"; angle0=0; angle1=1.5; }; class Fcr { type="rotation"; animPeriod=2.4; selection="Fcr"; axis="osa Fcr"; angle0=0; angle1=-1.8; }; class Fcl { type="rotation"; animPeriod=2.4; selection="Fcl"; axis="osa Fcl"; angle0=0; angle1=1.8; }; class Fcf { type="rotation"; animPeriod=2.4; selection="Fcf"; axis="osa Fcf"; angle0=0; angle1=1.6; }; class Lg1 { type="rotation"; animPeriod=2.4; selection="Lg1"; axis="osa Lg1"; angle0=0; angle1=-1.75; }; class Lcl { type="rotation"; animPeriod=2.4; selection="Lcl"; axis="osa Lcl"; angle0=0; angle1=1.65; }; class Lcc { type="rotation"; animPeriod=2.4; selection="Lcc"; axis="osa Lcc"; angle0=0; angle1=-1.5; }; class Rg1 { type="rotation"; animPeriod=2.4; selection="Rg1"; axis="osa Rg1"; angle0=0; angle1=1.75; }; class Rcr { type="rotation"; animPeriod=2.4; selection="Rcr"; axis="osa Rcr"; angle0=0; angle1=-1.65; }; class Rcc { type="rotation"; animPeriod=2.4; selection="Rcc"; axis="osa Rcc"; angle0=0; angle1=1.5; }; class slope { type="rotation"; animPeriod=3; selection="slope"; axis="osa slope"; angle0=0; angle1=3.55; }; }; class EventHandlers { init = "[_this select 0] exec ""\an12\geardd.sqs"",[_this select 0] exec ""\an12\gearcheck.sqs"""; Gear="if (_this Select 1) then {[_this select 0] exec ""\an12\geardown.sqs""} else {[_this select 0] exec ""\an12\gearup.sqs""}"; incomingMissile = "if ((_this select 0)==(_this select 0)) then{[_this] exec ""\an12\EastCM.sqs"",[_this] exec ""\an12\WestCM.sqs"",[_this] exec ""\an12\incoming_warning.sqs"",[_this select 0] exec ""\an12\flare.sqs""}"; }; class CfgSounds { class ramp_sound { sound[]={"\an12\ramp.wss",2,1}; name = "ramp_sound"; titles[] = {}; }; }; class CfgRadio { class incoming_sound { sound[]={"\An12\incoming_sound.wss",1.0,1.0}; name = "incoming_sound"; title = "INCOMING MISSILE"; }; }; Scripts: For Ramp ("Copen.sqs") <table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">_plane = _this select 0; _plane Say "ramp_sound" _plane animate ["Rbht", 1] _plane animate ["Rbhr", 1] _plane animate ["Rbhl", 1] exit For incoming warning (incoming_warning.sqs') <table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">_plane = _this select 0 ?(not alive (_plane select 0) ): goto "Exit" ?(not isengineon (_plane select 0) ): goto "Exit" _enemy = _plane select 2 _weaponname = _plane select 1 _missile = nearestobject [_enemy, _weaponname] (_plane select 0) vehicleradio "incoming_sound" #Exit exit When either script is activated a window pops up saying "Missing sound ramp_sound" or "Missing sound incoming_warning" Nomatter what I do it won't work. Someone please extend a helping hand. Share this post Link to post Share on other sites
bn880 5 Posted October 14, 2004 Not sure, try putting the name= parameter above the path one... (doubt that's the prob) Share this post Link to post Share on other sites
Milkman 1 Posted October 14, 2004 Didn't work Bn880, thanks for trying anyways. Share this post Link to post Share on other sites
theavonlady 2 Posted October 14, 2004 <table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE"> }; class EventHandlers See that blank line before the eventhandlers declaration? I think you're missing a close bracket there: <table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE"> }; }; class EventHandlers Not sure though. Check in a text editor. It's easier there to visually spot missing bracket indentations. Share this post Link to post Share on other sites
Footmunch 0 Posted October 14, 2004 Avon's right, there's a missing }; or two in there. CfgSounds (and CfgRadio) should be _outside_ CfgVehicles. They are separate sections, like CfgModels. Share this post Link to post Share on other sites
Milkman 1 Posted October 16, 2004 Fixed, thanks for the help. Share this post Link to post Share on other sites