- Joined
- Mar 18, 2020
- Messages
- 6
Edit: Solved, just had to clear the music list before playing the song..
Hello there. I'm trying to play music individually for players when they open up the music dialog and select a song. The music does play individually, but sometimes selecting the same button will play the other song (only have two songs atm). The weird part is that when I put the print statement in, the print statement is always correct, even if it plays the opposite song. This happens whether or not I'm alone or with other players.
At the start, if I click the same song over and over again, there is no issue. It will keep stopping and starting the same song. However, when I switch to the other song, issues begin occurring. Either it will successfully switch songs, or it will play the first song. From there on, clicking either song will choose a random song.
Is this a file corruption thing? Local player thing? Dialog thing? MP3 file thing? I have deleted and re-imported the songs several times changing the quality to lower file size, which might've caused issues..
I have udg_DialogButtons set to array size 12 in the variable editor so it's not that..
Any ideas? Thanks.
Hello there. I'm trying to play music individually for players when they open up the music dialog and select a song. The music does play individually, but sometimes selecting the same button will play the other song (only have two songs atm). The weird part is that when I put the print statement in, the print statement is always correct, even if it plays the opposite song. This happens whether or not I'm alone or with other players.
At the start, if I click the same song over and over again, there is no issue. It will keep stopping and starting the same song. However, when I switch to the other song, issues begin occurring. Either it will successfully switch songs, or it will play the first song. From there on, clicking either song will choose a random song.
Is this a file corruption thing? Local player thing? Dialog thing? MP3 file thing? I have deleted and re-imported the songs several times changing the quality to lower file size, which might've caused issues..
I have udg_DialogButtons set to array size 12 in the variable editor so it's not that..
Any ideas? Thanks.
-
Music Init
-

Events
-


Map initialization
-
-

Conditions
-

Actions
-


Custom script: set udg_LocalPlayer = GetLocalPlayer()
-
-
-
Music Show Dialog
-

Events
-


Player - Player 1 (Red) types a chat message containing -music as An exact match
-


Player - Player 2 (Blue) types a chat message containing -music as An exact match
-


Player - Player 3 (Teal) types a chat message containing -music as An exact match
-


Player - Player 4 (Purple) types a chat message containing -music as An exact match
-


Player - Player 5 (Yellow) types a chat message containing -music as An exact match
-


Player - Player 6 (Orange) types a chat message containing -music as An exact match
-


Player - Player 7 (Green) types a chat message containing -music as An exact match
-


Player - Player 8 (Pink) types a chat message containing -music as An exact match
-


Player - Player 9 (Gray) types a chat message containing -music as An exact match
-


Player - Player 10 (Light Blue) types a chat message containing -music as An exact match
-


Player - Player 11 (Dark Green) types a chat message containing -music as An exact match
-
-

Conditions
-

Actions
-


Dialog - Clear MusicDialog
-


Dialog - Change the title of MusicDialog to Music
-


Dialog - Create a dialog button for MusicDialog labelled BH
-


Set VariableSet DialogButtons[1] = (Last created dialog Button)
-


Dialog - Create a dialog button for MusicDialog labelled HG
-


Set VariableSet DialogButtons[2] = (Last created dialog Button)
-


Dialog - Show MusicDialog for (Triggering player)
-
-
-
Music Choose
-

Events
-


Dialog - A dialog button is clicked for MusicDialog
-
-

Conditions
-

Actions
-


If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-



If - Conditions
-




(Clicked dialog button) Equal to DialogButtons[1]
-
-



Then - Actions
-




If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-





If - Conditions
-






LocalPlayer Equal to (Triggering player)
-
-





Then - Actions
-






Game - Display to (All players) the text: Playing BH
-






Sound - Stop music Immediately
-






Sound - Play bh <gen>
-
-





Else - Actions
-
-
-



Else - Actions
-
-


If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-



If - Conditions
-




(Clicked dialog button) Equal to DialogButtons[2]
-
-



Then - Actions
-




If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-





If - Conditions
-






LocalPlayer Equal to (Triggering player)
-
-





Then - Actions
-






Game - Display to (All players) the text: Playing HG
-






Sound - Stop music Immediately
-






Sound - Play hg <gen>
-
-





Else - Actions
-
-
-



Else - Actions
-
-
-
Last edited:
