Add & Remove - set alliance - enemy

Aiden

Member
Reaction score
0
im triying to do this:
if someone die and the INTEGER variable is 0, then add the player to a group with other player have the same score. and all have set alliance against the player with a score great than 0.

All this happen whith the event:
Unit - Die

can i do better ?

I got this trigger:

Trigger:
  • NoobTeam
    • Events
      • Unit - A unit Dies
    • Conditions
      • ((Dying unit) is A Hero) Equal to True
    • Actions
      • -------- E q u i p o 0 P O I N T S --------
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • Gold_Score[(Player number of (Owner of (Killing unit)))] Greater than 0
        • Then - Actions
          • Player Group - Remove (Owner of (Killing unit)) from Losbuenos
          • Player Group - Add (Owner of (Killing unit)) to LosMalos
        • Else - Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • Gold_Score[(Player number of (Owner of (Dying unit)))] Equal to 0
        • Then - Actions
          • Player Group - Remove (Owner of (Dying unit)) from LosMalos
          • Player Group - Add (Owner of (Dying unit)) to Losbuenos
        • Else - Actions
      • Player Group - Make LosMalos treat Losbuenos as an Enemy
      • Player Group - Make LosMalos treat LosMalos as an Enemy
      • Player Group - Make Losbuenos treat Losbuenos as an Ally
 

TheLegend

New Member
Reaction score
10
Trigger:
  • Events
    • Unit - A unit Dies
    • Conditions
      • ((Dying unit) is A Hero) Equal to (==) True
    • Actions
    • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
      • Gold_Score[(Player number of (Owner of (Killing unit)))] Greater than 0
    • Then - Actions
      • Player Group - Remove (Owner of (Killing unit)) from Losbuenos
      • Player Group - Add (Owner of (Killing unit)) to LosMalos
    • Else - Actions
    • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
      • Gold_Score[(Player number of (Owner of (Dying unit)))] Equal to 0
    • Then - Actions
      • Player Group - Remove (Owner of (Dying unit)) from LosMalos
      • Player Group - Add (Owner of (Dying unit)) to Losbuenos
    • Else - Actions
      • Do Multiple ActionsFor each (Integer A) from 1 to 12, do (Actions)
        • Loop - Actions
          • Do Multiple ActionsFor each (Integer B) from 1 to 12, do (Actions)
            • Loop - Actions
              • Multiple FunctionsIf (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • If - Conditions
                  • Multiple ConditionsOr - Any (Conditions) are true
                    • Conditions
                      • Multiple ConditionsAnd - All (Conditions) are true
                        • Conditions
                          • ((Player((Integer B))) is in Losbuenos) Equal to (==) True
                          • ((Player((Integer A))) is in Losbuenos) Equal to (==) True
                      • Multiple ConditionsAnd - All (Conditions) are true
                        • Conditions
                          • ((Player((Integer B))) is in LosMalos) Equal to (==) True
                          • ((Player((Integer A))) is in LosMalos) Equal to (==) True
                • Then - Actions
                  • Player - Make (Player((Integer B)) treat (Player((Integer A)) as an Ally
                  • Player - Make (Player((Integer A)) treat (Player((Integer B)) as an Ally
                • Else - Actions
                  • Player - Make (Player((Integer B)) treat (Player((Integer A)) as an Enemy
                  • Player - Make (Player((Integer A)) treat (Player((Integer B)) as an Enemy

how about this
idk what u wanted but i replaced the last 3 functions with a faster way of setting alliance
 
General chit-chat
Help Users
  • No one is chatting at the moment.

      The Helper Discord

      Members online

      Affiliates

      Hive Workshop NUON Dome World Editor Tutorials

      Network Sponsors

      Apex Steel Pipe - Buys and sells Steel Pipe.
      Top