• 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.

About Background Music

Status
Not open for further replies.
Level 30
Joined
Nov 29, 2012
Messages
6,637
Didnt loop , i dont know why , it only plays 1 random track


=========
= Trigger 1 =
=========
Event
MapInitialization

Action
Set Normal_BackTheme[1] = Helix - Fear <gen>
Set Normal_BackTheme[2] = Helix - Illusion <gen>
Set Normal_BackTheme[3] = Helix - Interlink <gen>
Set Normal_BackTheme[4] = Helix - NoRegret <gen>

=========
= Trigger 2 =
=========

Event
MapInitialization

Action
Sound - Play Normal_BackTheme[RandomInteger number between 1 and 4]
 
Level 16
Joined
Dec 15, 2011
Messages
1,423
Didnt loop , i dont know why , it only plays 1 random track


=========
= Trigger 1 =
=========
Event
MapInitialization

Action
Set Normal_BackTheme[1] = Helix - Fear <gen>
Set Normal_BackTheme[2] = Helix - Illusion <gen>
Set Normal_BackTheme[3] = Helix - Interlink <gen>
Set Normal_BackTheme[4] = Helix - NoRegret <gen>

=========
= Trigger 2 =
=========

Event
MapInitialization

Action
Sound - Play Normal_BackTheme[RandomInteger number between 1 and 4]

http://www.hiveworkshop.com/forums/miscellaneous-tutorials-456/how-easily-post-triggers-163285/

Actually, since you know how long the tracks will last, you can do it in a better way.

First you need to register the duration of the tracks (in second).

  • Set Track_Dur[1] = 150
  • Set Track_Dur[2] = 250
Then you put it in the loop.

  • For each (Integer Temp_Integer) from 0 to 1, do (Actions)
    • Loop - Actions
      • Sound - Play Normal_BackTheme[Random_Int]
      • Wait Track_Dur[Random_Int] seconds
      • Set Temp_Integer = (Temp_Integer - 1)

Freehand triggering so this should be used only as reference :3

edit

Scratch 99999, I found a way to do infinite loop.
 
Proudly to say that i made it on my own :D

  • General Sound Settings
    • Events
      • Time - Elapsed game time is 0.01 seconds
    • Conditions
    • Actions
      • Set ANormal_Background_Theme = (Random integer number between 1 and 4)
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • ANormal_Background_Theme Equal to 1
        • Then - Actions
          • Sound - Play Helix___Fear <gen>
          • Wait 304.00 seconds
          • Trigger - Run (This trigger) (ignoring conditions)
        • Else - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • ANormal_Background_Theme Equal to 2
            • Then - Actions
              • Sound - Play Helix___Illusion <gen>
              • Wait 240.00 seconds
              • Trigger - Run (This trigger) (ignoring conditions)
            • Else - Actions
              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • If - Conditions
                  • ANormal_Background_Theme Equal to 3
                • Then - Actions
                  • Sound - Play Helix___Interlink <gen>
                  • Wait 462.00 seconds
                  • Trigger - Run (This trigger) (ignoring conditions)
                • Else - Actions
                  • Sound - Play Helix___No_Regret <gen>
                  • Wait 240.05 seconds
                  • Trigger - Run (This trigger) (ignoring conditions)
 
Status
Not open for further replies.
Top