Music List

killbuzz

Member
Reaction score
9
How do I use the music list feature in the trigger editor? There is the default "music" but it doesn't seem to do anything. I just need it to play normal wc3 music at random. Thanks in advance :D

Edit: Ok let me rephrase what i said: I want to make a trigger that when a player types: "-randommusic" random music will start playing, but i want it like a playlist so the player doesnt have to type it over, and over again.
 

BRUTAL

I'm working
Reaction score
118
you can make a sound variable with an array, and set every song you want to play as different array
then make a sound trigger that plays YourSound[random integer between (min num) and (max num)
 

killbuzz

Member
Reaction score
9
you can make a sound variable with an array, and set every song you want to play as different array
then make a sound trigger that plays YourSound[random integer between (min num) and (max num)

*sigh* i was hoping for an eaisy way out but that's never the case with the editor lol, ok if noone else posts i'll try that. thx
 

killbuzz

Member
Reaction score
9
Sound - Play Music Theme

if that's what your asking for, i was kinda confused

ok let me rephrase what i said: I want to make a trigger that when a player types: "-randommusic" random music will start playing, but i want it like a playlist so the player doesnt have to type it over, and over again.
 

WilliamPa

Active Member
Reaction score
51
I just realized, it's not really that hard, hers two triggers to do it
Edit: The coundown time in the second trigger must be longer than your longest song ^^ If they have very different lenghts, there can be abit bugs.

Code:
Initializion
    Events
        Map initialization
    Conditions
    Actions
        Set Music[1] = Comradeship <gen>
        Set Music[2] = Credits <gen>
        Set Music[3] = DarkAgents <gen>
        Set Music[4] = DarkVictory <gen>
        Set Music[5] = Doom <gen>
        Set Music[6] = HeroicVictory <gen>
        Set Music[7] = Human1 <gen>
        Set Music[8] = Human2 <gen>
        Set Music[9] = Human3 <gen>
        Set Music[10] = HumanDefeat <gen>
Okay hers other trigger
Code:
Music
    Events
        Player - Player 1 (Red) types a chat message containing -randommusic as An exact match
        Time - MusicTimer expires
    Conditions
    Actions
        Sound - Stop music Immediately
        Set MusicNumber = (Random integer number between 1 and 10)
        Sound - Play Music[MusicNumber]
        Countdown Timer - Start MusicTimer as a One-shot timer that will expire in 60.00 seconds
 

killbuzz

Member
Reaction score
9
Thanks for the triggers, sadly the songs are different lengths (maybe i could put a condition that if no music is playing then play a random song...) Thanks again :D
EDIT: I just had a thought... what kind of variable is "music" that you used? (sound?)
 

cleeezzz

The Undead Ranger.
Reaction score
268
if your variable is Sound Type, and all the fields are blank, or have no sounds to pick, then thats telling you its the wrong variable :p

whereas if you use a Sound variable, you'll be able to pick from the list.


EDIT: hm how does Sound - Music List work?
 

killbuzz

Member
Reaction score
9
if your variable is Sound Type, and all the fields are blank, or have no sounds to pick, then thats telling you its the wrong variable :p

whereas if you use a Sound variable, you'll be able to pick from the list.


EDIT: hm how does Sound - Music List work?

Hmm well let me rephrase what I said: I want to know what "Variable Type" he used in the trigger. I tryed using sound, but no music appeared, im trying "sound type" now.
EDIT doesn't work. >.> And I can't seem to find Sound - Music List

(Just to make sure this is the variable list im wondering about)
 

BRUTAL

I'm working
Reaction score
118
its not sound type lol
did you go to the sound editor, and for the music/sound you want to use right on it and click "use as sound"
 

killbuzz

Member
Reaction score
9
its not sound type lol
did you go to the sound editor, and for the music/sound you want to use right on it and click "use as sound"

yes i did try that, i had everything set up but for some reason it would not allow me to use the variable i had created for a random pick to play the sound. :( so thats why i was wondering about that list (in above post) My other concern is what if there are sounds playing when the player types "-randommusic" will that make that sound stop as well?

Edit: Ok here is my current trigger I am going to test it shortly:

PHP:
Music Init
    Events
        Map initialization
    Conditions
    Actions
        Set Music_List[1] = ArthasTheme <gen>
        Set Music_List[2] = BloodElfTheme <gen>
        Set Music_List[3] = Comradeship <gen>
        Set Music_List[4] = DarkAgents <gen>
        Set Music_List[5] = Doom <gen>
        Set Music_List[6] = Human1 <gen>
        Set Music_List[7] = Human2 <gen>
        Set Music_List[8] = Human3 <gen>
        Set Music_List[9] = HumanX1 <gen>
        Set Music_List[10] = IllidansTheme <gen>
        Set Music_List[11] = LichKingTheme <gen>
        Set Music_List[12] = NagaTheme <gen>
        Set Music_List[13] = NightElf1 <gen>
        Set Music_List[14] = NightElf2 <gen>
        Set Music_List[15] = NightElf3 <gen>
        Set Music_List[15] = NightElf3 <gen>
        Set Music_List[16] = NightElfX1 <gen>
        Set Music_List[17] = Orc1 <gen>
        Set Music_List[18] = Orc2 <gen>
        Set Music_List[19] = Orc3 <gen>
        Set Music_List[20] = OrcTheme <gen>
        Set Music_List[21] = OrcX1 <gen>
        Set Music_List[22] = PursuitTheme <gen>
        Set Music_List[23] = SadMystery <gen>
        Set Music_List[24] = Undead1 <gen>
        Set Music_List[25] = Undead2 <gen>
        Set Music_List[26] = Undead3 <gen>
        Set Music_List[27] = UndeadX1 <gen>
And to play them:
PHP:
Random Music
    Events
        Player - Player 1 (Red) types a chat message containing -randommusic as An exact match
    Conditions
    Actions
        Sound - Stop music After fading
        Sound - Stop (Last played sound) After fading
        Wait 2.00 seconds
        Sound - Play Music_List[(Random integer number between 1 and 27)]

EDIT: Test'd it and it works good... (wonder why it didnt work before....) Anyways thanks for your help and time +rep to you guys :)
 
General chit-chat
Help Users
  • No one is chatting at the moment.

      The Helper Discord

      Members online

      No members online now.

      Affiliates

      Hive Workshop NUON Dome World Editor Tutorials

      Network Sponsors

      Apex Steel Pipe - Buys and sells Steel Pipe.
      Top