• Listen to a special audio message from Bill Roper to the Hive Workshop community (Bill is a former Vice President of Blizzard Entertainment, Producer, Designer, Musician, Voice Actor) 🔗Click here to hear his message!
  • Read Evilhog's interview with Gregory Alper, the original composer of the music for WarCraft: Orcs & Humans 🔗Click here to read the full interview.

[Trigger] Bug in Trigger?

Status
Not open for further replies.
Level 3
Joined
May 1, 2007
Messages
34
Hello people, i've made this trigger that suposedly plays a music list, i've made it following this thread:


(Thanks PurplePoot I guess :thumbs_up: )

However in gameplay this seems to do nothing :sad:
  • Untitled Trigger 003
    • Events
      • Map initialization
    • Conditions
    • Actions
      • Set Music_Lenght[1] = 135.00
      • Set Music_Lenght[2] = 139.00
      • Set Music_Lenght[3] = 146.00
      • Set Music_Lenght[4] = 158.00
  • Timer
    • Events
      • Time - T expires
    • Conditions
    • Actions
      • Set tempInt = (Random integer number between 1 and 4)
      • Countdown Timer - Start T as a One-shot timer that will expire in Music_Lenght[tempInt] seconds
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • tempInt Equal to 1
        • Then - Actions
          • Sound - Musicnr1 <gen>
        • Else - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • tempInt Equal to 2
            • Then - Actions
              • Sound - Musicnr2 <gen>
            • Else - Actions
              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • If - Conditions
                  • tempInt Equal to 3
                • Then - Actions
                  • Sound - Musicnr3 <gen>
                • Else - Actions
                  • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                    • If - Conditions
                      • tempInt Equal to 4
                    • Then - Actions
                      • Sound - Musicnr4 <gen>
                    • Else - Actions
                      • Do nothing
Thanks..
 
Last edited:
Level 3
Joined
May 1, 2007
Messages
34
Hmm, atm whenever the trigger runs it just keeps playing the same music no idea why, I've tried changing it to Play Music Theme (plays only 1 music) and Play Music (repeats a random music), and finnaly Play sound but it is the same as 'Play Music Theme'. any idea why this is happening?

At map init I do:

  • Trigger - Turn off Timer <gen>
And to make it run I do:

  • Trigger - Run Timer <gen> (checking conditions)
Other Triggers:

  • Untitled Trigger 003
    • Events
      • Map initialization
    • Conditions
    • Actions
      • Set Music_Lenght[1] = 135.00
      • Set Music_Lenght[2] = 139.00
      • Set Music_Lenght[3] = 146.00
      • Set Music_Lenght[4] = 158.00

  • Timer
    • Events
      • Time - T expires
      • Time - Elapsed game time is 5.00 seconds
    • Conditions
    • Actions
      • Set tempInt = (Random integer number between 1 and 4)
      • Countdown Timer - Start T as a One-shot timer that will expire in Music_Lenght[tempInt] seconds
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • tempInt Equal to 1
        • Then - Actions
          • Sound - Play 04_Song_of_Elune <gen>
        • Else - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • tempInt Equal to 2
            • Then - Actions
              • Sound - Play 06_A_Call_to_Arms <gen>
            • Else - Actions
              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • If - Conditions
                  • tempInt Equal to 3
                • Then - Actions
                  • Sound - Play 03_Legacy <gen>
                • Else - Actions
                  • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                    • If - Conditions
                      • tempInt Equal to 4
                    • Then - Actions
                      • Sound - Play 03___Toshiro_Masuda___Nine_Tail_Demon_Fox <gen>
                    • Else - Actions
Thanks, been trying to solve this for about an hour but still nothing :confused:
 
Last edited:
Level 2
Joined
May 15, 2007
Messages
27
Here is some things you should look into. the timer can be set to length of last played music.

I would do it something like this. It would allow for mode that doesn't shuffle and just counts in order ect. If you would like me to further explain all this I can.

  • Untitled Trigger 001
    • Events
      • Time - T expires
    • Conditions
    • Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • Mode Equal to 1
        • Then - Actions
          • Set song = (Random integer number between 1 and 3)
          • Countdown Timer - Destroy (Last created timer window)
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • song Equal to 1
            • Then - Actions
              • Sound - Stop music Immediately
              • Sound - Play ArthasTheme <gen>
            • Else - Actions
              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • If - Conditions
                  • song Equal to 2
                • Then - Actions
                  • Sound - Stop music Immediately
                  • Sound - Play BloodElfTheme <gen>
                • Else - Actions
                  • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                    • If - Conditions
                      • song Equal to 3
                    • Then - Actions
                      • Sound - Stop music Immediately
                      • Sound - Play Comradeship <gen>
                    • Else - Actions
          • Countdown Timer - Start T as a One-shot timer that will expire in (Length of (Last played music)) seconds
          • Countdown Timer - Create a timer window for T with title (String(song))
          • Countdown Timer - Show (Last created timer window)
        • Else - Actions
          • Do nothing
 
Level 2
Joined
May 15, 2007
Messages
27
Skillz. I don't play with music much.

Anyways, I'm not so sure he would want a timerdialog, as it's supposed to run in the background and those are annoying.

Also, your trigger never starts


He already has a trigger to start it. This is simply the timer trigger, not the starting trigger. He doesn't have to create and show the timer window. I was simply showing him he did not need to set variables to song length. Its a simple function that is built in. I cant remember how I did my radio system for one of my old maps but it used a similar system that displayed song title and play time, or was that wow. Either way its pretty fun and simple thing to add to your map.
 
Level 3
Joined
May 1, 2007
Messages
34
Thanks for the help , Grivus Dorelock and PurplePoot (sorry for misspell). Still not very skilled with triggers but I think I can use those :)
 
Status
Not open for further replies.
Top