Music Lists

Status
Not open for further replies.
First of all, you need two variables, one of type "Sound" (with array) and one of type "Integer". You will also need a Timer variable:
  • Trigger1
  • Events
    • Time - Elapsed game-time is 0.00 seconds
  • Conditions
  • Actions
    • Set Music[1] = war3mapImported\Music1.mp3
    • Set Music[2] = war3mapImported\Music2.mp3
    • Set Music[3] = war3mapImported\Music3.mp3
    • Set Chance = (Random integer number between 1 and 3)
    • Sound - Play Music[Chance]
    • Countdown Timer - Start MusicTimer as a one-shot timer that will expire in (Length of (Music[Chance])) seconds
  • Trigger2
  • Events
    • Time - MusicTimer expires
  • Conditions
  • Actions
    • Set Chance = (Random integer number between 1 and 3)
    • Sound - Play Music[Chance]
    • Countdown Timer - Start MusicTimer as a one-shot timer that will expire in (Length of (Music[Chance])) seconds
Chance is the integer variable, Music[] is the sound variable and MusicTimer the Timer variable. (Length of (Music[Chance])) is the Sound - Length of sound.
 
Status
Not open for further replies.
Back
Top