- Joined
- Jun 17, 2004
- Messages
- 10
All I want is for players to be able to choose their own music, regardless of race. So an Orc player could listen to Human, NE, or
Undead music (or maybe some campaign music).
Now, I set up a LocalPlayer variable at initialization with this line of code:
set udg_LocalPlayer = GetLocalPlayer()
With an if-then-else function, LocalPlayer works perfectly. My friend and I tested this online, and I couldn't hear his "personal"
sound effects, and he couldn't hear mine. So it definitely works.
But...as soon as he tried to set his music to something else, he was disconnected. He tried again twice, and the same thing
happened twice. Here's the trigger involved:
EVENTS:
+ A button is clicked for Music
CONDITIONS:
+ (Clicked dialog button) Equal to HumanButton
ACTIONS:
+ If/Then/Else, Multiple Functions
[IF:]
+ (Triggering player) Equal to LocalPlayer
[THEN:]
+ Sound - Clear the music list
+ Set DICE = (Random integer number between 1 and 4)
+ If (DICE Equal to 1) then do (Sound - Play Human1) else do (Do nothing)
+ If (DICE Equal to 2) then do (Sound - Play Human2) else do (Do nothing)
+ If (DICE Equal to 3) then do (Sound - Play Human3) else do (Do nothing)
+ If (DICE Equal to 4) then do (Sound - Play HumanX1) else do (Do nothing)
+ Custom script: call SetMapMusicRandomBJ( "Sound\\Music\\mp3Music\\Human1.mp3;Sound\\Music\\mp3Music\\Human2.mp3;Sound\\Music\\mp3Music\\Human3.mp3;Sound\\Music\\mp3Music\\HumanX1.mp3" )
(This is a Sound - Set Music List action, but I replaced "music" with that big mess of filenames.)
As you can imagine, there are similar triggers for Orc, NE, Undead, and some other music. When we tested it, my friend tried
different ones, and they all disconnected him. BUT--it never disconnected me.
In fact, it worked perfectly for me; the music changed to whatever, and from then on it played a random song from the list.
So why on earth does this trigger disconnect other people when LocalPlayer works just fine for sound effects?
Undead music (or maybe some campaign music).
Now, I set up a LocalPlayer variable at initialization with this line of code:
set udg_LocalPlayer = GetLocalPlayer()
With an if-then-else function, LocalPlayer works perfectly. My friend and I tested this online, and I couldn't hear his "personal"
sound effects, and he couldn't hear mine. So it definitely works.
But...as soon as he tried to set his music to something else, he was disconnected. He tried again twice, and the same thing
happened twice. Here's the trigger involved:
EVENTS:
+ A button is clicked for Music
CONDITIONS:
+ (Clicked dialog button) Equal to HumanButton
ACTIONS:
+ If/Then/Else, Multiple Functions
[IF:]
+ (Triggering player) Equal to LocalPlayer
[THEN:]
+ Sound - Clear the music list
+ Set DICE = (Random integer number between 1 and 4)
+ If (DICE Equal to 1) then do (Sound - Play Human1) else do (Do nothing)
+ If (DICE Equal to 2) then do (Sound - Play Human2) else do (Do nothing)
+ If (DICE Equal to 3) then do (Sound - Play Human3) else do (Do nothing)
+ If (DICE Equal to 4) then do (Sound - Play HumanX1) else do (Do nothing)
+ Custom script: call SetMapMusicRandomBJ( "Sound\\Music\\mp3Music\\Human1.mp3;Sound\\Music\\mp3Music\\Human2.mp3;Sound\\Music\\mp3Music\\Human3.mp3;Sound\\Music\\mp3Music\\HumanX1.mp3" )
(This is a Sound - Set Music List action, but I replaced "music" with that big mess of filenames.)
As you can imagine, there are similar triggers for Orc, NE, Undead, and some other music. When we tested it, my friend tried
different ones, and they all disconnected him. BUT--it never disconnected me.
In fact, it worked perfectly for me; the music changed to whatever, and from then on it played a random song from the list.
So why on earth does this trigger disconnect other people when LocalPlayer works just fine for sound effects?