- Joined
- Mar 27, 2019
- Messages
- 56
Hi there,
I'm trying to implement my UI while also fiddling with GetLocalPlayer(), I wonder if this method of doing it causes any desync.
Is it unnecessary to do it like that, can I just use "BlzFrameSetTexture(backdrop, s, 0, true)" in the GetLocalPlayer() block?
How do I test if any desyncs happen? As someone that doesn't have access to playtesters, it hurts to see that my map desynced in a full lobby, leaving everyone disappointed/wasting their time.
Any help would be greatly appreciated, I'm trying to release my map but the desyncs are holding it back. I dont know if its the Custom UI or the Save/Load System.
I'm trying to implement my UI while also fiddling with GetLocalPlayer(), I wonder if this method of doing it causes any desync.
Lua:
function AutoSendToggleFunc()
-- Set Local Variables
local p
local i
local s
local backdrop = BackdropLocalPlayerDisplay
-- Show Frame
BlzFrameSetEnable(AutoSendToggle, false)
BlzFrameSetEnable(AutoSendToggle, true)
-- Get Player
p = GetTriggerPlayer()
-- Get Player ID
i = GetConvertedPlayerId(p)
-- Check for Boolean
if udg_Send_Toggle[i] == false then
-- Set True
udg_Send_Toggle[i] = true
if GetLocalPlayer() == p then
backdrop = BackdropAutoSendToggle
end
s = "Custom\\BTNActivated.tga"
BlzFrameSetTexture(backdrop, s, 0, true)
else
-- Set False
udg_Send_Toggle[i] = false
if GetLocalPlayer() == p then
backdrop = BackdropAutoSendToggle
end
s = "Custom\\BTNDeactivated.tga"
BlzFrameSetTexture(backdrop, s, 0, true)
end
end
-
Player l Menu Command
-
Events
-
Conditions
-
Actions
-
Set VariableSet Temp_Player = (Triggering player)
-
Set VariableSet Temp_Integer = (Player number of Temp_Player)
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
-
(Level of Menu for Player_Builder[Temp_Integer]) Equal to 1
-
-
Then - Actions
-
Unit - Set level of Menu for Player_Builder[Temp_Integer] to 2
-
Unit - For Unit Player_Builder[Temp_Integer], start cooldown of ability Menu " over "1.00 seconds.
-
Custom script: local backdrop_skin = BackdropLocalPlayerDisplay
-
Custom script: local backdrop_title = BackdropLocalPlayerDisplay
-
Custom script: if GetLocalPlayer() == udg_Temp_Player then
-
Custom script: backdrop_skin = BackdropSkinHUD
-
Custom script: backdrop_title = BackdropTitleDisplay
-
Custom script: end
-
Custom script: BlzFrameSetVisible( backdrop_skin, true )
-
Custom script: BlzFrameSetVisible( backdrop_title, true )
-
-
Else - Actions
-
Unit - Set level of Menu for Player_Builder[Temp_Integer] to 1
-
Unit - For Unit Player_Builder[Temp_Integer], start cooldown of ability Menu " over "1.00 seconds.
-
Custom script: local backdrop_skin = BackdropLocalPlayerDisplay
-
Custom script: local backdrop_title = BackdropLocalPlayerDisplay
-
Custom script: if GetLocalPlayer() == udg_Temp_Player then
-
Custom script: backdrop_skin = BackdropSkinHUD
-
Custom script: backdrop_title = BackdropTitleDisplay
-
Custom script: end
-
Custom script: BlzFrameSetVisible( backdrop_skin, false )
-
Custom script: BlzFrameSetVisible( backdrop_title, false )
-
-
-
-
Is it unnecessary to do it like that, can I just use "BlzFrameSetTexture(backdrop, s, 0, true)" in the GetLocalPlayer() block?
How do I test if any desyncs happen? As someone that doesn't have access to playtesters, it hurts to see that my map desynced in a full lobby, leaving everyone disappointed/wasting their time.
Any help would be greatly appreciated, I'm trying to release my map but the desyncs are holding it back. I dont know if its the Custom UI or the Save/Load System.