Remember to use GetLocalPlayer() function in a safe manner to avoid desync.
Desync occurs when you create a split handle (Selected Player gets to see/feel the effect, other player will not be able to see it), which is what you're doing it now.
Desync-prone trigger;
-
Actions
-

Custom script: if GetLocalPlayer() == GetTriggerPlayer() then
-

Special Effect - Create a special effect at (Center of (Playable map area)) using Abilities\Spells\Human\ThunderClap\ThunderClapCaster.mdl
-

Custom script: endif
Prevent desync trigger;
-
Actions
-

Set SFX = <Empty String>
-

Custom script: if GetLocalPlayer() == GetTriggerPlayer() then
-

Set SFX = Abilities\Spells\Human\ThunderClap\ThunderClapCaster.mdl
-

Custom script: endif
-

Special Effect - Create a special effect at (Center of (Playable map area)) using SFX
As you can see, I'm creating the handle
outside the GetLocalPlayer() function, that way, it will never creates a split handle for other players.
So, if you create the handle outside the GetLocalPlayer() function, won't it affect other players as well ?
- No, because as you can see, before I called the function, I set my SFX variable (string variable) to an Empty String, and when I go into the GetLocalPlayer() function, I set the variable to "Abilities\Spells\Human\ThunderClap\ThunderClapCaster.mdl"
Note that this variable setting occurs
inside the GetLocalPlayer() function, right ?
Meaning that
only the affected player will be setting that variable, and other players just followed the Empty String.
And after the SFX variable is set, I get out of the GetLocalPlayer() function and creates a handle
for all players but
only the players inside the function will see the effect while other players don't because I set it to Empty String, got that ?
Same goes to a situation where you want to create a unit that is
only available to you.
First, you set that unit = No unit
And then inside the GetLocalPlayer() function, you set the variable to you desired unit
And then you create the unit by using the variable.
Only the affected players will see the unit, while others don't because you have set it to No unit, meaning that No unit is spawned for other players.