• 🏆 Texturing Contest #33 is OPEN! Contestants must re-texture a SD unit model found in-game (Warcraft 3 Classic), recreating the unit into a peaceful NPC version. 🔗Click here to enter!

Chat message for selecting units triggers a desync

Status
Not open for further replies.
Level 2
Joined
Jun 15, 2021
Messages
3
Hello, i've been working on a trigger that if a player says -spawns it should select some type of units of type Town hall owned by the player who says -spawns but it always ends up in desync if someone could help me why is this happening or if theres another way for fixing this
1638588644779.png
---This case will end up in desync
1638588692834.png

But if i change the trigger so the last triggering player isnt written, it wouldnt desync instead it would select the type of units for the player who does -spawns but it would clear the selection for every other player, i have used variables but seems to work the same, i have divided the trigger for every player but still works the same even changing (triggering player) for the respective color it keeps clearing selection for other players.
1638588907873.png
---This one will clear selections for other players
Pls help and ty!
 

Uncle

Warcraft Moderator
Level 64
Joined
Aug 10, 2018
Messages
6,579
You can't use Waits like that. A lot of the Event Responses either get set to Null (nothing) or can be changed to something else when you use a Wait.

Try this:
  • Actions
    • Selection - Clear selection for (Triggering player).
    • Set VariableSet TempGroup = (Units owned by (Triggering player) matching (((Matching unit) is A town-hall-type unit) Equal to True).)
    • Unit Group - Pick every unit in TempGroup and do (Actions)
      • Loop - Actions
        • Selection - Add (Picked unit) to selection for (Triggering player)
    • Custom script: call DestroyGroup (udg_TempGroup)
 
Last edited:
Status
Not open for further replies.
Top