Hello,
I've been trying to make a small sound replacement mod for use with my group on Arma CO, the replacement part is going fine and sounds ok. But when I tried to add a new sound it fell apart.
My objective is to make a sound file play when the player(s) gets into a UH1Y, then terminate playing when the player(s) gets out.
I have been told the best way to do this is add an event handler to my UH1Y config, and direct it to an SQF file.
I've googled on how to write this stuff but have no luck with getting any clear instruction. Could someone please help me to do this.
What I have written is below but it does not work:
Added into the UH1Y config :
class CfgSounds {
class Radio {
name = "Radio";
sound[] = {"cmSound_s_UH1Y\Radio_On", db+15, 1};
titles[] = {};
};
class Radio_Off {
name = "Radio_Off";
sound[] = {"cmSound_s_UH1Y\Radio_Off", db+15, 1};
titles[] = {};
};
};
The Event Handler in my UH1Y config:
class EventHandlers {
init = " [_this select 0] execVM ""\cmSound_c_UH1Y\scripts\Radio.sqf""";
My SQF file:
_UH1Y addEventHandler ["GetIn",
{
if (_this select 1) then {
sound[] = {"cmSound_s_UH1Y\Radio_On", db+15, 1};
};
};
];
_UH1Y addEventHandler ["GetOut",
{
if (_this select 1) then {
sound[] = {"cmSound_s_UH1Y\Radio_Off", db+15, 1};
};
};
];
I know this is probably time consuming for someone to help me but If i can get a working version I can learn from it and stuff.
Thank you
HOME 

Reply With Quote



