Loop problem, or something more?

TideOfChaos

New Member
Reaction score
25
I am making a sort of party system. It adds units into a party, creates parties and quits from them with abilities. I am using Leaderboards for my party windows, so everyone in the party has a leaderboard with there party leader, current quest and other players displayed in it.

My triggers are fine to create the party, set the party leader, and the current quest. But, I am having trouble adding players to the Leaderboard. It annoys me because all I am doing is adding a player into a player group, the same player group the Party Leader is in, and that displays fine.

Triggers:
Trigger:
  • Create Party
    • Events
      • Unit - A unit Starts the effect of an ability
    • Conditions
      • (Ability being cast) Equal to (==) Create Party
    • Actions
      • Player Group - Remove (Owner of (Triggering unit)) from Party[1]
      • Player Group - Remove (Owner of (Triggering unit)) from Party[2]
      • Player Group - Remove (Owner of (Triggering unit)) from Party[3]
      • Player Group - Remove (Owner of (Triggering unit)) from Party[4]
      • Player Group - Remove (Owner of (Triggering unit)) from Party[5]
      • Player Group - Remove (Owner of (Triggering unit)) from Party[6]
      • Player Group - Remove (Owner of (Triggering unit)) from Party[7]
      • Player Group - Remove (Owner of (Triggering unit)) from Party[8]
      • -------- ------------------- --------
      • Set PartyLeader[(Player number of (Owner of (Triggering unit)))] = (Owner of (Triggering unit))
      • Player Group - Add (Owner of (Triggering unit)) to Party[(Player number of (Owner of (Triggering unit)))]
      • -------- ------------------- --------
      • Game - Display to (All players) the text: <Empty String>
      • -------- ------------------- --------
      • Trigger - Run Update Partyboards <gen> (checking conditions)


Trigger:
  • Create Party
    • Events
      • Unit - A unit Starts the effect of an ability
    • Conditions
      • (Ability being cast) Equal to (==) Create Party
    • Actions
      • Player Group - Remove (Owner of (Triggering unit)) from Party[1]
      • Player Group - Remove (Owner of (Triggering unit)) from Party[2]
      • Player Group - Remove (Owner of (Triggering unit)) from Party[3]
      • Player Group - Remove (Owner of (Triggering unit)) from Party[4]
      • Player Group - Remove (Owner of (Triggering unit)) from Party[5]
      • Player Group - Remove (Owner of (Triggering unit)) from Party[6]
      • Player Group - Remove (Owner of (Triggering unit)) from Party[7]
      • Player Group - Remove (Owner of (Triggering unit)) from Party[8]
      • -------- ------------------- --------
      • Set PartyLeader[(Player number of (Owner of (Triggering unit)))] = (Owner of (Triggering unit))
      • Player Group - Add (Owner of (Triggering unit)) to Party[(Player number of (Owner of (Triggering unit)))]
      • -------- ------------------- --------
      • Game - Display to (All players) the text: <Empty String>
      • -------- ------------------- --------
      • Trigger - Run Update Partyboards <gen> (checking conditions)


Trigger:
  • Update Partyboards
    • Events
      • Time - Every 1.00 seconds of game time
    • Conditions
    • Actions
      • Set tmpInt = 0
        • Do Multiple ActionsFor each (Integer A) from 1 to 8, do (Actions)
          • Loop - Actions
            • Set tmpInt = (tmpInt + 1)
            • Leaderboard - Destroy PartyLeaderboard[tmpInt]
            • -------- -------- --------
            • Player Group - Pick every player in Party[tmpInt] and do (Actions)
              • Loop - Actions
                • Leaderboard - Create a leaderboard for (Player group((Picked player))) titled (Party Leader + (Name of PartyLeader[tmpInt]))
            • Set PartyLeaderboard[(Player number of PartyLeader[tmpInt])] = (Last created leaderboard)
            • Leaderboard - Add Neutral Victim to PartyLeaderboard[tmpInt] with label (Current Quest: + PartyQuest[tmpInt]) and value 0
            • Leaderboard - Change the display style for Neutral Victim in (Last created leaderboard) to Show the label, Hide the value, and Hide the icon
            • Leaderboard - Change the color of the label for Neutral Victim in PartyLeaderboard[tmpInt] to (100.00%, 80.00%, 20.00%) with 0.00% transparency
            • Player Group - Pick every player in Party[tmpInt] and do (Actions)
              • Loop - Actions
                • Leaderboard - Add (Picked player) to PartyLeaderboard[tmpInt] with label (Name of (Picked player)) and value 0


Trigger:
  • Add to Party
    • Events
      • Unit - A unit Starts the effect of an ability
    • Conditions
      • (Ability being cast) Equal to (==) Add to Party
    • Actions
      • Multiple FunctionsIf (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • ((Owner of (Triggering unit)) is in (Player group(PartyLeader[(Player number of (Owner of (Triggering unit)))]))) Equal to (==) True
        • Then - Actions
          • -------- ------------------- --------
          • Player Group - Add (Owner of (Target unit of ability being cast)) to Party[1]
          • Trigger - Run Update Partyboards <gen> (checking conditions)
        • Else - Actions
          • Game - Display to (Player group((Owner of (Triggering unit)))) the text: YOU AREN'T A PARTY ...
 
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