JackFighter

Game Load Event Handler (A3, CUP, Custom)

Jul 31st, 2021 (edited)
532
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
SQF 0.58 KB | None | 0 0
  1. //For Vanilla, CUP, and custom
  2. //Essential because after load game will stop any music from playing. Checks once for combat environment, then plays relevant song after which main script kicks in.
  3.  
  4. addMusicEventHandler ["MusicStop", {musicBooleanStop = true}];
  5. _randomCalmDay = selectRandom dayCalmAmbient;
  6. _randomCalmNight = selectRandom nightCalmAmbient;
  7. _randomAction = selectRandom actionAmbient;
  8. if (detectionBoolean isEqualTo true) then
  9. {
  10.     playMusic _randomAction;
  11. } else
  12.  
  13. {
  14.     if (dayTime < 19) then {playMusic _randomCalmDay;} else {playMusic _randomCalmNight;};
  15. };
  16.  
Add Comment
Please, Sign In to add comment