Player alliances trough triggers issue.

ThranDeuL

New Member
Reaction score
1
Do triggers detect alliance changes through triggers?

Details:
I've got a problem. In my map are custom teams wich are made trough triggers.
It's an arena game in wich if you die, you are dead for the entire round.
You win a round if all your opponents are dead ofcourse.
This is sort of what i do in the trigger to see if 1 entire team is dead:
I pick every unit within the arena region and i check wether they are an ally or an opponent of colour red.
If it's an ally the integer variable x is set to 1, if it's an enemy the integer variable z is set to 1. Then i check with a condition to see if either of them is 0.
If 1 of them is 0 that means that that team is completely dead.

But somehow it bugs out, i would like to find the bugg myself but i cant find it if it has the following explanation:
In the preset teams all the players are allied, the alliances only change trough triggers.
What if the triggers doesnt detect alliance changes trough triggers but only detect the preset teams.
 

skyblader

You're living only because it's illegal killing.
Reaction score
159
Why not do something like this?

Trigger:
  • Trigger
    • Events
    • Conditions
    • Actions
      • Player Group - Pick every player in (All allies of Player 1 (Red)) and do (Actions)
        • Loop - Actions
          • Set TempUnitGroup = (Units owned by (Picked player))
          • Unit Group - Add all units of TempUnitGroup to unitgroupVar
          • Custom script: call DestroyGroup(udg_TempUnitGroup)
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (All units of unitgroupVar are dead) Equal to True
        • Then - Actions
        • Else - Actions
 

ThranDeuL

New Member
Reaction score
1
It must be in 1 and the same trigger and there can't be any wait/waiting for condition actions. So that prob won't work.

And before i start fixing it i need to know if triggers detect the chance in alliances done by triggers.
 

skyblader

You're living only because it's illegal killing.
Reaction score
159
I doubt that. Just tested it and it says no, so I guess you'll just have to set the players into a variable when you set their alliance.
 
General chit-chat
Help Users
  • No one is chatting at the moment.

      The Helper Discord

      Members online

      No members online now.

      Affiliates

      Hive Workshop NUON Dome World Editor Tutorials

      Network Sponsors

      Apex Steel Pipe - Buys and sells Steel Pipe.
      Top