diff --git a/Random-Sound-Generator.md b/Random-Sound-Generator.md new file mode 100644 index 0000000..47ef1c6 --- /dev/null +++ b/Random-Sound-Generator.md @@ -0,0 +1,73 @@ + + +description.ext +``` +class CfgSounds +{ + sounds[] = {}; + class banzaii + { + name = "banzaii"; // Name in the editor + sound[] = {"sounds\banzaii.ogg", 1, 1}; // Path, Volume, Pitch + titles[] = {0, ""}; + }; + + class doyo + { + name = "doyo"; // Name in the editor + sound[] = {"doyo.ogg", 1, 1}; // Path, Volume, Pitch + titles[] = {0, ""}; + }; + + class macho + { + name = "macho"; // Name in the editor + sound[] = {"macho.ogg", 1, 1}; // Path, Volume, Pitch + titles[] = {0, ""}; + }; +}; + +``` + + +scrim.sqf +``` +_noot = 0; +_doyo = 1; +_macho = 2; + +_unit = _this select 0; + +_switch = [_noot,_doyo,_macho] call BIS_fnc_selectRandom; + +//hint format ["%1",_switch]; + +switch (_switch) do { + + case _noot:{ + //hint "noot"; + [_unit, "noot"] remoteExec ["say3D"]; + }; + + case _doyo:{ + //hint "doyo"; + [_unit, "doyo"] remoteExec ["say3D"]; + }; + + case _macho:{ + //hint "macho"; + [_unit, "macho"] remoteExec ["say3D"]; + }; +}; + +``` +/* +//tigger set to side +//repeatable +//thin +//on activation: + +``` +_unita = thisList select 0; +[_unita]execVM "scrim.sqf"; +``` \ No newline at end of file