- Joined
- Dec 11, 2014
- Messages
- 2,004
The title says enough, will this desync?
Or in other words: Is the GetLocalPlayer() safe to use here?
_______
The System is meant to be a music system, both having an External and a Normal music system. the External music will support three files in the file typed in and the tracks "ATfaH - 1/2/3". It DOES work in singleplayer, but I don't know about Multiplayer or LAN.
PS: yes the array size of my timers are set to 8.
Thanks in advance!
Or in other words: Is the GetLocalPlayer() safe to use here?
_______
The System is meant to be a music system, both having an External and a Normal music system. the External music will support three files in the file typed in and the tracks "ATfaH - 1/2/3". It DOES work in singleplayer, but I don't know about Multiplayer or LAN.
PS: yes the array size of my timers are set to 8.
-
MS Init
-
Events
-
Map initialization
-
-
Conditions
-
Actions
-
Sound - Set music volume to 0.00%
-
For each (Integer A) from 1 to 8, do (Actions)
-
Loop - Actions
-
Trigger - Add to MS Register <gen> the event (Player - (Player((Integer A))) types a chat message containing -Music External as A substring)
-
Trigger - Add to MS Normal <gen> the event (Player - (Player((Integer A))) types a chat message containing -Music Normal as An exact match)
-
-
-
-
-
MS Register
-
Events
-
Conditions
-
Actions
-
Custom script: if GetLocalPlayer() == GetTriggerPlayer() then
-
Set MS_Filename[(Player number of (Triggering player))] = (Substring((Entered chat string), 17, (Length of (Entered chat string))))
-
Set TempString = MS_Filename[(Player number of (Triggering player))]
-
Set TempString = (TempString + (\\ + ATfaH - 1.mp3))
-
Custom script: if GetSoundFileDuration(udg_TempString) > 0 then
-
Set MS_Has_EF[(Player number of (Triggering player))] = True
-
Set Temp_PlayerGroup = (Player group((Triggering player)))
-
Game - Display to Temp_PlayerGroup the text: Ezio's Family Detec...
-
Custom script: call DestroyForce(udg_Temp_PlayerGroup)
-
Custom script: else
-
Set Temp_PlayerGroup = (Player group((Triggering player)))
-
Game - Display to Temp_PlayerGroup the text: Ezio's Family Missi...
-
Custom script: call DestroyForce(udg_Temp_PlayerGroup)
-
Custom script: endif
-
Custom script: endif
-
-------- - --------
-
Custom script: if GetLocalPlayer() == GetTriggerPlayer() then
-
Set TempString = MS_Filename[(Player number of (Triggering player))]
-
Set TempString = (TempString + (\\ + ATfaH - 2.mp3))
-
Custom script: if GetSoundFileDuration(udg_TempString) > 0 then
-
Set MS_Has_N[(Player number of (Triggering player))] = True
-
Set Temp_PlayerGroup = (Player group((Triggering player)))
-
Game - Display to Temp_PlayerGroup the text: Nightsong Detected.
-
Custom script: call DestroyForce(udg_Temp_PlayerGroup)
-
Custom script: else
-
Set Temp_PlayerGroup = (Player group((Triggering player)))
-
Game - Display to Temp_PlayerGroup the text: Nightsong Missing.
-
Custom script: call DestroyForce(udg_Temp_PlayerGroup)
-
Custom script: endif
-
Custom script: endif
-
-------- - --------
-
Custom script: if GetLocalPlayer() == GetTriggerPlayer() then
-
Set TempString = MS_Filename[(Player number of (Triggering player))]
-
Set TempString = (TempString + (\\ + ATfaH - 3.mp3))
-
Custom script: if GetSoundFileDuration(udg_TempString) > 0 then
-
Set MS_Has_I[(Player number of (Triggering player))] = True
-
Set Temp_PlayerGroup = (Player group((Triggering player)))
-
Game - Display to Temp_PlayerGroup the text: Ironforge Detected.
-
Custom script: call DestroyForce(udg_Temp_PlayerGroup)
-
Custom script: else
-
Set Temp_PlayerGroup = (Player group((Triggering player)))
-
Game - Display to Temp_PlayerGroup the text: Ironforge Missing.
-
Custom script: call DestroyForce(udg_Temp_PlayerGroup)
-
Custom script: endif
-
Custom script: endif
-
-------- - --------
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
-
MS_Has_EF[(Player number of (Triggering player))] Equal to False
-
MS_Has_I[(Player number of (Triggering player))] Equal to False
-
MS_Has_N[(Player number of (Triggering player))] Equal to False
-
-
Then - Actions
-
Game - Display to Temp_PlayerGroup the text: |cFFFF0000Playing E...
-
Sound - Set music volume to 0.00%
-
Set MS_Filename[(Player number of (Triggering player))] = <Empty String>
-
-
Else - Actions
-
Sound - Set music volume to 100.00%
-
Set MS_MusicCounterEx[(Player number of (Triggering player))] = 0
-
Countdown Timer - Start MS_Timer[(Player number of (Triggering player))] as a One-shot timer that will expire in 1.00 seconds
-
-
-
-
-
MS Normal
-
Events
-
Conditions
-
Actions
-
Set MS_Has_EF[(Player number of (Triggering player))] = False
-
Set MS_Has_N[(Player number of (Triggering player))] = False
-
Set MS_Has_I[(Player number of (Triggering player))] = False
-
Sound - Set music volume to 100.00%
-
Set MS_MusicCounter[(Player number of (Triggering player))] = 0
-
-
-
MS Core
-
Events
-
Time - Every 1.00 seconds of game time
-
-
Conditions
-
Actions
-
For each (Integer TempInt) from 1 to 8, do (Actions)
-
Loop - Actions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
-
(Remaining time for MS_Timer[(Player number of (Triggering player))]) Less than or equal to 0.00
-
-
Then - Actions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
-
MS_Has_EF[TempInt] Equal to False
-
MS_Has_I[TempInt] Equal to False
-
MS_Has_N[TempInt] Equal to False
-
-
Then - Actions
-
Sound - Set music volume to 100.00%
-
Set MS_MusicCounter[TempInt] = ((MS_MusicCounter[TempInt] + 1) mod 5)
-
Set TempInt2 = MS_MusicCounter[TempInt]
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
-
TempInt2 Equal to 0
-
-
Then - Actions
-
Custom script: if GetLocalPlayer() == ConvertedPlayer(udg_TempInt) then
-
Sound - Stop music Immediately
-
Sound - Play SadMystery01 <gen>
-
Custom script: endif
-
Countdown Timer - Start MS_Timer[TempInt] as a One-shot timer that will expire in (Length of SadMystery01 <gen>) seconds
-
-
Else - Actions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
-
TempInt2 Equal to 1
-
-
Then - Actions
-
Custom script: if GetLocalPlayer() == ConvertedPlayer(udg_TempInt) then
-
Sound - Stop music Immediately
-
Sound - Play MainTheme <gen>
-
Custom script: endif
-
Countdown Timer - Start MS_Timer[TempInt] as a One-shot timer that will expire in (Length of MainTheme <gen>) seconds
-
-
Else - Actions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
-
TempInt2 Equal to 2
-
-
Then - Actions
-
Custom script: if GetLocalPlayer() == ConvertedPlayer(udg_TempInt) then
-
Sound - Stop music Immediately
-
Sound - Play HeroicVictory01 <gen>
-
Custom script: endif
-
Countdown Timer - Start MS_Timer[TempInt] as a One-shot timer that will expire in (Length of HeroicVictory01 <gen>) seconds
-
-
Else - Actions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
-
TempInt2 Equal to 3
-
-
Then - Actions
-
Custom script: if GetLocalPlayer() == ConvertedPlayer(udg_TempInt) then
-
Sound - Stop music Immediately
-
Sound - Play IllidansTheme <gen>
-
Custom script: endif
-
Countdown Timer - Start MS_Timer[TempInt] as a One-shot timer that will expire in (Length of IllidansTheme <gen>) seconds
-
-
Else - Actions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
-
TempInt2 Equal to 4
-
-
Then - Actions
-
Custom script: if GetLocalPlayer() == ConvertedPlayer(udg_TempInt) then
-
Sound - Stop music Immediately
-
Sound - Play BloodElfTheme01 <gen>
-
Custom script: endif
-
Countdown Timer - Start MS_Timer[TempInt] as a One-shot timer that will expire in (Length of BloodElfTheme01 <gen>) seconds
-
-
Else - Actions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
-
TempInt2 Equal to 5
-
-
Then - Actions
-
Custom script: if GetLocalPlayer() == ConvertedPlayer(udg_TempInt) then
-
Sound - Stop music Immediately
-
Sound - Play Comradeship01 <gen>
-
Custom script: endif
-
Countdown Timer - Start MS_Timer[TempInt] as a One-shot timer that will expire in (Length of Comradeship01 <gen>) seconds
-
-
Else - Actions
-
-
-
-
-
-
-
-
-
-
-
-
-
Else - Actions
-
Sound - Set music volume to 100.00%
-
Set MS_MusicCounterEx[TempInt] = ((MS_MusicCounterEx[TempInt] + 1) mod 4)
-
Set TempInt2 = MS_MusicCounterEx[TempInt]
-
Set TempString = MS_Filename[(Player number of (Triggering player))]
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
-
TempInt2 Equal to 0
-
-
Then - Actions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
-
MS_Has_I[TempInt] Equal to True
-
-
Then - Actions
-
Set TempString = MS_Filename[TempInt]
-
Set TempString = (TempString + (\\ + ATfaH - 1.mp3))
-
Custom script: if GetLocalPlayer() == ConvertedPlayer(udg_TempInt) then
-
Sound - Stop music Immediately
-
Custom script: call PlayMusic(udg_TempString)
-
Custom script: endif
-
Countdown Timer - Start MS_Timer[TempInt] as a One-shot timer that will expire in (Length of IllidansTheme <gen>) seconds
-
-
Else - Actions
-
-
-
Else - Actions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
-
TempInt2 Equal to 1
-
-
Then - Actions
-
Custom script: if GetLocalPlayer() == ConvertedPlayer(udg_TempInt) then
-
Sound - Stop music Immediately
-
Sound - Play MainTheme <gen>
-
Custom script: endif
-
Countdown Timer - Start MS_Timer[TempInt] as a One-shot timer that will expire in (Length of MainTheme <gen>) seconds
-
-
Else - Actions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
-
TempInt2 Equal to 2
-
-
Then - Actions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
-
MS_Has_EF[TempInt] Equal to True
-
-
Then - Actions
-
Set TempString = MS_Filename[TempInt]
-
Set TempString = (TempString + (\\ + ATfaH - 2.mp3))
-
Custom script: if GetLocalPlayer() == ConvertedPlayer(udg_TempInt) then
-
Sound - Stop music Immediately
-
Custom script: call PlayMusic(udg_TempString)
-
Custom script: endif
-
Countdown Timer - Start MS_Timer[TempInt] as a One-shot timer that will expire in (Length of Comradeship01 <gen>) seconds
-
-
Else - Actions
-
-
-
Else - Actions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
-
TempInt2 Equal to 3
-
-
Then - Actions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
-
MS_Has_N[TempInt] Equal to True
-
-
Then - Actions
-
Set TempString = MS_Filename[TempInt]
-
Set TempString = (TempString + (\\ + ATfaH - 3.mp3))
-
Custom script: if GetLocalPlayer() == ConvertedPlayer(udg_TempInt) then
-
Sound - Stop music Immediately
-
Custom script: call PlayMusic(udg_TempString)
-
Custom script: endif
-
Countdown Timer - Start MS_Timer[TempInt] as a One-shot timer that will expire in (Length of Comradeship01 <gen>) seconds
-
-
Else - Actions
-
-
-
Else - Actions
-
-
-
-
-
-
-
-
-
-
-
Else - Actions
-
-
-
-
-
Thanks in advance!