• Listen to a special audio message from Bill Roper to the Hive Workshop community (Bill is a former Vice President of Blizzard Entertainment, Producer, Designer, Musician, Voice Actor) 🔗Click here to hear his message!
  • Read Evilhog's interview with Gregory Alper, the original composer of the music for WarCraft: Orcs & Humans 🔗Click here to read the full interview.
  • Create a faction for Warcraft 3 and enter Hive's 19th Techtree Contest: Co-Op Commanders! Click here to enter!
  • Create a void inspired texture for Warcraft 3 and enter Hive's 34th Texturing Contest: Void! Click here to enter!
  • The Hive's 21st Texturing Contest: Upgrade is now concluded, time to vote for your favourite set of icons! Click here to vote!

Different Leaderboard for each Player?

Status
Not open for further replies.
Level 16
Joined
May 1, 2008
Messages
1,605
Moin moin =)

Just take the fastest way: You create your leaderboard ( but Multiboards are better to use ). At the end of the leaderboard creation, you store this leaderboard for each player into a variable. Just use 1 variable with arrays [ Amount of arrays = Amount of how many LB's you want show ].

After storing you type the following 3 lines at the end of the trigger

  • Custom script: if (GetLocalPlayer() == Player(0)) then
  • Leaderboard - Show (LB variable for player 1)
  • Custom script: endif
Now you do this for every player {You have to change the Player(0) [ Player(0) = Player 1 ( Red )]} and ofc the correct variable.

Edit: After reading your post again I'm not sure that I understand it correctly - let's see what happen =S

Greetings
~ The Bomb King > Dr. Boom
 
Level 14
Joined
Aug 30, 2004
Messages
909
I'm having trouble with this exact problem now. I used the following trigger. It was run manually by a different trigger.

Make Multiboards
Events
Conditions
Actions
Trigger - Turn off (This trigger)
For each (Integer A) from 1 to 12, do (Actions)
Loop - Actions
Multiboard - Create a multiboard with 1 columns and 4 rows, titled Damage
Multiboard - Set the text for (Last created multiboard) item in column 1, row 1 to Lasers
Multiboard - Set the text for (Last created multiboard) item in column 1, row 2 to Missiles
Multiboard - Set the text for (Last created multiboard) item in column 1, row 3 to Engines
//TESTED BELOW
Multiboard - Set the text for (Last created multiboard) item in column 1, row 4 to (String((Integer A)))
Multiboard - Minimize Leaderboard[(Integer A)]
//the variable is called "leaderboard" but obviously I used Multiboard actions.
Set Leaderboard[(Integer A)] = (Last created multiboard)
Custom script: if GetLocalPlayer() ==Player(bj_forLoopAIndex-1) then
Multiboard - Show Leaderboard[(Integer A)]
Custom script: endif

So in theory this should make 12 multiboards, one shown for each player.
When I play the game, I am Red (player 1) but my forth row shows 12. In other words, I'm seeing the 12th multiboard not the first one. When I play as player 2 I also see "12" in the forth row.

Did I get the Jass wrong? This trigger seems to just make 12 multiboards and show everyone the 12th one.
 
Level 14
Joined
Aug 30, 2004
Messages
909
try "Hide (Leaderboard[Integer A])" before you do the show/getlocalplayer part

Hmm... I can see your logic and I would have thought it would work, but now NO leaderboard shows up for player 1 or 2... (I haven't tested other players but I assume it's the same).

Here's the trigger:

Make Multiboards
Events
Conditions
Actions
Trigger - Turn off (This trigger)
For each (Integer A) from 1 to 12, do (Actions)
Loop - Actions
Multiboard - Create a multiboard with 1 columns and 4 rows, titled Damage
Multiboard - Set the text for (Last created multiboard) item in column 1, row 1 to Lasers
Multiboard - Set the color for (Last created multiboard) item in column 1, row 1 to (20.00%, 80.00%, 20.00%) with 0.00% transparency
Multiboard - Set the text for (Last created multiboard) item in column 1, row 2 to Missiles
Multiboard - Set the color for (Last created multiboard) item in column 1, row 2 to (20.00%, 80.00%, 20.00%) with 0.00% transparency
Multiboard - Set the text for (Last created multiboard) item in column 1, row 3 to Engines
Multiboard - Set the color for (Last created multiboard) item in column 1, row 3 to (20.00%, 80.00%, 20.00%) with 0.00% transparency
Multiboard - Set the text for (Last created multiboard) item in column 1, row 4 to (String((Integer A)))
Multiboard - Set the color for (Last created multiboard) item in column 1, row 4 to (20.00%, 80.00%, 20.00%) with 0.00% transparency
Set Leaderboard[(Integer A)] = (Last created multiboard)
Multiboard - Hide Leaderboard[(Integer A)]
Custom script: if (GetLocalPlayer() ==Player(bj_forLoopAIndex-1)) then
Multiboard - Show Leaderboard[(Integer A)]
Custom script: endif
 
Status
Not open for further replies.
Top