• 🏆 Texturing Contest #33 is OPEN! Contestants must re-texture a SD unit model found in-game (Warcraft 3 Classic), recreating the unit into a peaceful NPC version. 🔗Click here to enter!
  • It's time for the first HD Modeling Contest of 2024. Join the theme discussion for Hive's HD Modeling Contest #6! Click here to post your idea!

[General] Creating a music system that can stop and resume

Status
Not open for further replies.
Level 5
Joined
Aug 18, 2013
Messages
85
  • Music
    • Events
      • Time - Elapsed game time is 5.00 seconds
    • Conditions
    • Actions
      • Sound - Play war3mapImported\05 L'arrivee Sur L'ile.mp3
  • Music 2
    • Events
      • Time - Every 75.00 seconds of game time
    • Conditions
    • Actions
      • Sound - Play war3mapImported\05 L'arrivee Sur L'ile.mp3
At one point the music stops and a cinematic plays. There are also several other cinematics that stop the music and use this code.

  • Music PLAY AFTER
    • Events
    • Conditions
    • Actions
      • Wait 8.50 seconds
      • Sound - Set music volume to 100.00%
      • Sound - Set Music to 100.00%
      • Trigger - Turn on Music PLAY AFTER 2 <gen>
      • Trigger - Turn on Music PLAY AFTER 3 <gen>
      • Trigger - Run Music PLAY AFTER 2 <gen> (ignoring conditions)
      • Trigger - Turn off (This trigger)
  • Music PLAY AFTER 2
    • Events
    • Conditions
    • Actions
      • Sound - Play war3mapImported\05 L'arrivee Sur L'ile.mp3
      • Wait 75.00 seconds
      • Trigger - Run Music PLAY AFTER 3 <gen> (ignoring conditions
  • Music PLAY AFTER 3
    • Events
    • Conditions
    • Actions
      • Trigger - Run Music PLAY AFTER 2 <gen> (ignoring conditions)
But it the song restarts at inappropriate times.

I want the song to replay when it's finished. What do I do?
 
Level 23
Joined
Jan 1, 2009
Messages
1,608
Use the SoundManager to make your game use the Sound.
Then you can just turn on looping = true in the SoundManager.
wm19Q95.png
 
Status
Not open for further replies.
Top