intercom.sqf 537 B

123456789101112131415161718
  1. infiniteCounter =0;
  2. counter = 0;
  3. _sounds = ["Sounds\allengineers.ogg","Sounds\fireonflightdeck.ogg","Sounds\scrambleren.ogg","Sounds\takeoff.ogg","Sounds\underattack.ogg"];
  4. sleep 60;
  5. while {infiniteCounter ==0} do
  6. {
  7. _play = _sounds select counter;
  8. playSound3D [MISSION_ROOT + _play, radioSource, false, getPosASL radioSource, 50, 1, 100];//works by itsself
  9. sleep 60;//Wait 60seconds.
  10. counter = counter+1;//Used to increment counter.
  11. if (counter == 5) then//If statement to loop through the _sounds array.
  12. {
  13. counter =0;
  14. };
  15. };