JackFighter

Game Load Event Handler (SOG PF)

Jul 12th, 2021 (edited)
162
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
SQF 0.69 KB | None | 0 0
  1. //Only for SOG PF
  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. _randomActionDay = selectRandom dayActionAmbient;
  8. _randomActionNight = selectRandom nightActionAmbient;
  9. if (detectionBoolean isEqualTo true) then
  10. {
  11.     if (dayTime < 19) then {playMusic _randomActionDay;} else {playMusic _randomActionNight;};
  12. } else
  13.  
  14. {
  15.     if (dayTime < 19) then {playMusic _randomCalmDay;} else {playMusic _randomCalmNight;};
  16. };
  17.  
Add Comment
Please, Sign In to add comment