• 🏆 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!

[Trigger] Play music only for once?

Status
Not open for further replies.
Level 3
Joined
Mar 3, 2011
Messages
33
Hey fellas,

this is probably a pretty dumb question, but i found nearly nothing on the web and no tutorials here about this, so i guess i have to ask :(

When i import some custom music and implement it in my map (as music) it loops infinitely. Problem: I only want it to play once and then be off (stop).

I tried it with a timer, but well, when you go to the questlog or menu the timer stops but the music loops on. So that doesnt solve the problem.
Also, with Clear Music List right after playing the music i can't solve it either. And i can't play it as a sound because i have to be able to fade it out at some times.

Help would be appreciated :)
RyFridge
 

_PV

_PV

Level 7
Joined
Aug 28, 2010
Messages
285
Here's a very broad but possibly helpful solution:
  • Untitled Trigger 001
    • Events
      • Time - Elapsed game time is 120.00 seconds (your song's length)
    • Conditions
    • Actions
      • Sound - Stop music After fading
      • Sound - Clear the music list
Take the "120 seconds" as the full length of the music. this should work :)
haha, didn't see magtheridon answer :p but yeah, the idea is relevant.
 
Level 3
Joined
Mar 3, 2011
Messages
33
have you tested it?

Yes i have, and the problem is that the timer is pausing when visiting the questlog and other menues, but the music does not. Meaning that the stop is delayed by the time im in the quest menu, so the music will restart (because it is on automatic loop which i can not disable) and will then stop after the delayed time.
 
Level 17
Joined
Jul 17, 2011
Messages
1,864
go to sound editor in wc3 and select your music with your mouse.

while your music is selected press Enter you will see all of these nifty little options, one of which is a boolean named "Looping" it most likely has a little check mark next to it uncheck it and test.

if there is no check then i have no idea whats wrong :D
 
Status
Not open for further replies.
Top