-
-
Save commy2/052eeb4ebf487e0366eddea4836204ca to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
boombox addaction ["Radion on", { | |
// make scheduler atomic | |
isNil { | |
// delete previsous sound source | |
private _soundSource = boombox getVariable ["Mission_soundSource", objNull]; | |
deleteVehicle _soundSource; | |
// play sound and store sound source | |
_soundSource = allMissionObjects "#soundonvehicle"; | |
boombox say3D ["track01", 100, 1]; | |
_soundSource = allMissionObjects "#soundonvehicle" - _soundSource select 0; | |
boombox setVariable ["Mission_soundSource", _soundSource]; | |
}; | |
}]; | |
boombox addaction ["Radio off", { | |
// make scheduler atomic | |
isNil { | |
// delete previsous sound source | |
private _soundSource = boombox getVariable ["Mission_soundSource", objNull]; | |
deleteVehicle _soundSource; | |
}; | |
}]; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment