| 08-27-2002, 11:56 PM | #1 |
I'm making a 4 way Free for All hero arena and I'm having trouble making 2 leaderboards. 1 For Individual kills, and 1 for team kills.. this is exactly what I did: Variables are: Kills, and Kills2 Each are integer Variables. TheLeaderboard and TheLeaderboard2 Leadboard variables... Triggers are: Set Up Leaderboard: Conditions: None Events: None Actions: -Destroy Last created Leadboard -For Each (IntegerA) from 1-12, do Set(Kills[IntegerA] = 0) -Wait for 1 second -Leaderboard: Create Leaderboard for (Allplayers) Titled: Individual Kills -Set Leaderboard = last created Leaderboard -Add Player 1 to leaderboard named (Nameof(player1)) and Value Kills(1) -Add Player 2 to leaderboard named (Nameof(player2)) and Value Kills(2) -Add Player 3 to leaderboard named (Nameof(player4)) and Value Kills(3) -Add Player 4 to leaderboard named (Nameof(player4)) and Value Kills(4) -Add Player 5 to leaderboard named (Nameof(player5)) and Value Kills(5) -Add Player 6 to leaderboard named (Nameof(player6)) and Value Kills(6) -Add Player 7 to leaderboard named (Nameof(player7)) and Value Kills(7) -Add Player 8 to leaderboard named (Nameof(player8)) and Value Kills(8) -Add Player 9 to leaderboard named (Nameof(player9)) and Value Kills(9) -Add Player 10 to leaderboard named (Nameof(player10)) and Value Kills(10) -Add Player 11 to leaderboard named (Nameof(player11)) and Value Kills(11) -Add Player 12 to leaderboard named (Nameof(player12)) and Value Kills(12) -Leaderboard - Show the Last Created Leaderboard - Trigger - Turn on Update Leaderboard Update Leaderboard(Initially Off): Events: None Conditions: None Actions: - Player Group - Pick everyplayer in (allplayers) and change the value of (picked player) in TheLeaderboard to Kills (player Number(ofpickedplayer)) - Sort Leaderboard in Descdening order Leaderboard Switch: Events: Every 20 seconds of game time Conditions: None Actions: Trigger - Run Set up Leaderboard (ignoring conditions) wait for 13 seconds Trigger - Run set up Leaderboard2 (ignoring Conditions) Set Up Leaderboard2: -Destroy Last created Leadboard -For Each (IntegerA) from 1-12, do Set(Kills[IntegerA] = 0) -Wait for 1 second -Leaderboard: Create Leaderboard for (Allplayers) Titled: Team Kills -Set Leaderboard2 = last created Leaderboard -Add Player 1 to leaderboard named Team1 and Value Kills2(1) -Add Player 2 to leaderboard named Team2 and Value Kills(2) -Add Player 3 to leaderboard named Team3 and Value Kills2(3) -Add Player 4 to leaderboard named Team4 and Value Kills2(4) -Leaderboard - Show the Last Created Leaderboard - Trigger - Turn on Update Leaderboard2 Update Leaderboard2 (Initially Off): - Change The Value for Player1 in Leaderboard2 to Kills2(1) - Change The Value for Player2 in Leaderboard2 to Kills2(2) - Change The Value for Player3 in Leaderboard2 to Kills2(3) - Change The Value for Player4 in Leaderboard2 to Kills2(4) -Trigger - Run Team1 Wingame (checking Conditions) -Trigger - Run Team2 Wingame (checking Conditions) -Trigger - Run Team3 Wingame (checking Conditions) -Trigger - Run Team4 Wingame (checking Conditions) Now that is EXACTLY what I did.. and the leaderboard does't update or count for some reason.. Whenever someone gets a kill it shows in the individual kills 1 kill but next time it updates all the kills have been restarted to 0 for the individual kills leaderboard.. As for the Team Leaderboard (leaderboard2), I have no idea how it is updating.. most of the time I see it only work for player 4 and SOMETIMES player 1 but I never see it update for player 2 or 3 Can someone find the problem? and Please show me how to fix it?! -Thanx in advance |
| 08-28-2002, 12:33 AM | #2 | |
Guest | There are several things wrong here. First of all, your update triggers have no events. They need events. Give it a periodic event of a second or two. Second of all, it's because every 20 seconds, you're running the Set Up Leaderboard trigger, in which you set their kills to 0 for some reason. Duh. Don't do that. Also, this: Quote:
Could be shortened to this: For Each Integer A from 1 to 12, do (Add Player(Integer A) to leaderboard named (nameof(Player(Integer A))) and Value Kills[Integer A] |
