dreadpirate 173 Posted May 4, 2014 OK, I found myself putting the Muslim prayer sound on every minaret in every mission that I made. So I decided to work out how to automate the process and here's what I came up with: Place a Game Logic in the centre of the map and name it "centre". Place the Functions Module on the map. Add the following to your init.sqf: [true]execVM "scripts\initMinarets.sqf"; //use [false] if you don't want debug markers on the minarets Create a file in your scripts folder called initMinarets.sqf and paste the following: if (!isServer) exitWith {}; waituntil {!isnil "bis_fnc_init"}; _debug = _this select 0; possibleMinarets = ["Land_A_Minaret_Porto_EP1","Land_A_Mosque_big_minaret_2_EP1","Land_A_Minaret_EP1"]; includedMinarets = []; { includedMinarets = includedMinarets + (getPos centre nearObjects[_x,10000]); }forEach possibleMinarets; _i = 0; { call compile format [" if (_debug) then { _m%1 = createMarker[""myMinaret%1"",[position _x select 0,position _x select 1]]; _m%1 setMarkerShape ""ICON""; _m%1 setMarkerType ""mil_triangle""; _m%1 setmarkercolor ""colorred""; _m%1 setmarkerDir direction _x; }; _t%1 = createTrigger[""EmptyDetector"",getPos _x]; _t%1 setTriggerArea [0, 0, 0, false ]; _t%1 setTriggerActivation [""NONE"", ""PRESENT"", false]; _t%1 setTriggerStatements [""true"", """", """"]; if (random 1 < 0.5) then { _t%1 setSoundEffect [""$NONE$"", """", """", ""Muslim_prayer1""]; } else { _t%1 setSoundEffect [""$NONE$"", """", """", ""Muslim_prayer2""]; }; ",_i]; _i = _i + 1; }forEach includedMinarets; I haven't got it to work with minarets created by the Town Generator. Share this post Link to post Share on other sites