I was wondering if it is possible to change the Background music by the region you are in?
The reason for this is because on my map i have several regions for allies and enemies and would 'like' it if i could change the music for when you are in enemy territory. Off-hand the trigger would have to be Event: Unit enters region, but actions. idk. Help?
willuwontu that is not how to play music... Play Sound action plays a sound into a sound channel, which will mix with the background music soundtrack and other sound channels. The result will force players to turn music off to avoid conflict, will irritate players who want to turn music off to listen to their own music and potentially bug with multiple music tracks mixing together at once resulting in a raucous. Music are soundtracks and not sound.
The correct approach is to stop the music soundtrack and then start a new music soundtrack. For example the trigger below will play a random Terran Halloween sound track (includes some HotS music) in response to the esc being pressed. This will stop all currently playing music (including results from the last press) and play it in the music channel (ctrl+m will mute it).
Sound Test Events UI - Player Any Player presses Escape key Down with shift Allow, control Allow, alt Allow Local Variables Conditions Actions Sound - Stop current & queued Music soundtrack for (All players) (Immediately) Sound - Play Music Music_TerrHalloween (Any Soundtrack Index) for (All players) (with cue Any Cue) and Do Not make default
Both the Stop Soundtrack and Play Soundtrack actions take a player group representing the client controllers to alter the soundtrack for. This could be set to something like player group from player of owner of triggering unit in response to a unit enters a region event. A trigger like willuwontu's could be used to determine which soundtrack to play using just a single trigger.
Another approach would be to track the player camera target X/Y and use that to determine which music to play, only changing if it is in a region for more than 10 seconds. This might be more observer friendly and solves the problem of which units should be used to determine the player's soundtrack.
It is important to not change sound track too frequently as that can annoy players. If the soundtrack being played is short it would be best to allow it to complete and instead modify the default soundtrack so that the next soundtrack played is appropriate for the region.
Thanks, that helps out a lot. I am not to worried about changing the sound track to frequent because of how the game-play would work. But i also understand if it changes constantly like every couple seconds - that WOULD be annoying. lol.
I have a few triggers for 'sound' that do not operate as "music" - thanks for the switch idea though. never thought of that. Can use that for other stuff. ;)
Rollback Post to RevisionRollBack
To post a comment, please login or register a new account.
I was wondering if it is possible to change the Background music by the region you are in?
The reason for this is because on my map i have several regions for allies and enemies and would 'like' it if i could change the music for when you are in enemy territory. Off-hand the trigger would have to be Event: Unit enters region, but actions. idk. Help?
switch (triggering region)
if (lava region)
play sound
if (ice region)
play sound
Still alive and kicking, just busy.
My guide to the trigger editor (still a work in progress)
willuwontu that is not how to play music... Play Sound action plays a sound into a sound channel, which will mix with the background music soundtrack and other sound channels. The result will force players to turn music off to avoid conflict, will irritate players who want to turn music off to listen to their own music and potentially bug with multiple music tracks mixing together at once resulting in a raucous. Music are soundtracks and not sound.
The correct approach is to stop the music soundtrack and then start a new music soundtrack. For example the trigger below will play a random Terran Halloween sound track (includes some HotS music) in response to the esc being pressed. This will stop all currently playing music (including results from the last press) and play it in the music channel (ctrl+m will mute it).
Sound Test
Events
UI - Player Any Player presses Escape key Down with shift Allow, control Allow, alt Allow
Local Variables
Conditions
Actions
Sound - Stop current & queued Music soundtrack for (All players) (Immediately)
Sound - Play Music Music_TerrHalloween (Any Soundtrack Index) for (All players) (with cue Any Cue) and Do Not make default
Both the Stop Soundtrack and Play Soundtrack actions take a player group representing the client controllers to alter the soundtrack for. This could be set to something like player group from player of owner of triggering unit in response to a unit enters a region event. A trigger like willuwontu's could be used to determine which soundtrack to play using just a single trigger.
Another approach would be to track the player camera target X/Y and use that to determine which music to play, only changing if it is in a region for more than 10 seconds. This might be more observer friendly and solves the problem of which units should be used to determine the player's soundtrack.
It is important to not change sound track too frequently as that can annoy players. If the soundtrack being played is short it would be best to allow it to complete and instead modify the default soundtrack so that the next soundtrack played is appropriate for the region.
Thanks, that helps out a lot. I am not to worried about changing the sound track to frequent because of how the game-play would work. But i also understand if it changes constantly like every couple seconds - that WOULD be annoying. lol.