So I have this basic leaderboard.
Here's what I have it do:
Create the Leaderboard
- Set the variable 'Leaderboard' as the last created leaderboard
- Set Column 1 row 1 to 'Player'
- Set Column 2 row 1 to 'Kills'
- Set the automatic player column to column 1
- Add player 1 to leaderboard
... Add Players 2-7 to leaderboard
- Add player 8 to leaderboard
- If player 1 = player
- then set leaderboard item column 2 row 2 to 'Leaderboard Player 1'
- else set leaderboard column 1 row 2 to 'N/A'
... Ditto for players 2-8
Now, when I go in-game, it shows the kills for the people in there, but doesn't show 'Player', 'Kills', or 'N/A' in any unavailable slots. Through a buncha fiddling, I found out if I disabled '- Set the automatic player column to column 1', it shows everything but the players, so that has something to do with it.
With this information, can you thin of any solution? If needed, I'll screenshot the triggers and post 'em here.
Does this only work when you uploaded it, if i test it with my map it just says nobody is playing and i get errors when the hostile AI is killing something. But it does not add kill, i see the leaderboard to.
Ah, thank you. One more thing. Is it possible also to make sure allies don't count for this? If not, it's at an acceptable state. but ya know, it'd be nice.
Off-topic, just a clarification: != means not equal to, correct?
Does this only work when you uploaded it, if i test it with my map it just says nobody is playing and i get errors when the hostile AI is killing something. But it does not add kill, i see the leaderboard to.
Ensure you copied everything, including both triggers and both variables.
yes != does mean n ot equal to
uh i dont really know what you mean about the allies
Darvlok the reason it gives errors when player 15 kills something is because when it kills something it tries to modify kills[15] which doesnt exist so you need to make the array size 15
yes != does mean n ot equal to uh i dont really know what you mean about the allies
If I would kill a teammate, it would add the kill point. I would like it to not do that so they can't just feed eachother. It's not a necessity, but I'd like to prevent that.
Thanks, now i dont get a trigger error in the map. But still he does not show player 1, only when i put everything on 2 or more he shows it. I agree with it if it was player 2 was the only that did not show up, but why does player 1 not show if you do nothing and just copy paste the triggers. That does not make sense at all.
The Leaderbord works now, but needed to change value to two at these triggers / actions:
why do you want to show players that aren't there? I find this to work very well:
playerNum is the number of players, the +1 is to add a row for headings..
what the loop does is pick the next player from the active players group, and that way you go only over the active players and doesn't waste space on 6 players not present in game
it gives you only the active players and doesn't waste space on not-active ones..
No, my point is, I tested it using the other guys method and when I played, he was player 2 and I was player 1. We both showed up on the leaderboard, but only I would update and it says he wasn't playing.
There are 2 players in this match, me and the second player. The second player is the only one showing up on the leaderboard and it doesn't update his score. Only says he's 'Not Playing'.
I'm currently looking at the leaderboard init:
lets run the first - picked player = 1, he's playing
column 1 row 2 = name
column 2 row 2 = "0"
now lets go to the second player picked player = 2, as the leadeoboard tells you he's not playing so
column 1 row 2 = name
column 2 row 2 = "0"
now lets move to the unit dies trigger, player 1 kills a unit
picked player first is player 1, he's playing
column 1 row 2 = name
column 2 row 2 = "1"
next picked player is player 2, we already know he's not playing
column 1 row 2 = name
column 2 row 2 = "not playing"
now I have no idea what the "player = playing" actually means but I've got a feeling that the computer that represents player 2 (if it was a user on an online test I have no idea, off-line a user won't be in the active players group) isn't considered as playing
Rollback Post to RevisionRollBack
To post a comment, please login or register a new account.
So I have this basic leaderboard.
Here's what I have it do:
Create the Leaderboard
- Set the variable 'Leaderboard' as the last created leaderboard
- Set Column 1 row 1 to 'Player'
- Set Column 2 row 1 to 'Kills'
- Set the automatic player column to column 1
- Add player 1 to leaderboard
... Add Players 2-7 to leaderboard
- Add player 8 to leaderboard
- If player 1 = player
- then set leaderboard item column 2 row 2 to 'Leaderboard Player 1'
- else set leaderboard column 1 row 2 to 'N/A'
... Ditto for players 2-8
Now, when I go in-game, it shows the kills for the people in there, but doesn't show 'Player', 'Kills', or 'N/A' in any unavailable slots. Through a buncha fiddling, I found out if I disabled '- Set the automatic player column to column 1', it shows everything but the players, so that has something to do with it.
With this information, can you thin of any solution? If needed, I'll screenshot the triggers and post 'em here.
EDIT: Attached trigger screenshot
Resolved:
http://dl.dropbox.com/u/9914626/Leaderboard.SC2Map
you can just copy and paste the trigger you need to modify the array kills to the number of players you plan to support
@Gaurus: Go
Well, this sure reduces my 16 triggers for a leaderboard. xD
Thanks. One question though, what would I modify to ensure it only adds points with enemy kills?
@Gaurus: Go
Does this only work when you uploaded it, if i test it with my map it just says nobody is playing and i get errors when the hostile AI is killing something. But it does not add kill, i see the leaderboard to.
@Artanis you would add a condition for the unit dies trigger, owner of unit (triggering unit) != damaging player
@ Darvlok thats odd because it works for me when I move the triggers, pherhaps you copied something wrong?
@Gaurus: Go
Ah, thank you. One more thing. Is it possible also to make sure allies don't count for this? If not, it's at an acceptable state. but ya know, it'd be nice.
Off-topic, just a clarification: != means not equal to, correct?
Ensure you copied everything, including both triggers and both variables.
yes != does mean n ot equal to uh i dont really know what you mean about the allies
Darvlok the reason it gives errors when player 15 kills something is because when it kills something it tries to modify kills[15] which doesnt exist so you need to make the array size 15
@Gaurus: Go
I copied everything.
@Gaurus: Go
Uhm what array are you talking about, It already says all active players. Also it ignores player 1 and and only says that player 2 is not playing.
@Darvlok: Go
Click the 'Kills' variable, in the middle it says 'Array', next to that it says 'Size'. I believe you have to switch that to 15.
If I would kill a teammate, it would add the kill point. I would like it to not do that so they can't just feed eachother. It's not a necessity, but I'd like to prevent that.
@Artanis186: Go
Thanks, now i dont get a trigger error in the map. But still he does not show player 1, only when i put everything on 2 or more he shows it. I agree with it if it was player 2 was the only that did not show up, but why does player 1 not show if you do nothing and just copy paste the triggers. That does not make sense at all.
The Leaderbord works now, but needed to change value to two at these triggers / actions:
And this also on 2:
And this also
If there are at value 1 player 1 does not show up then, and if i only make the above 1 then the kills are not added.
you obviously did something wrong because there should be no reason you would have to have +2
@Gaurus:
I only copy paste the leaderboard..... but it works so it does not matter :)
I'm having a similar problem as Darvlok. But if I put it to +2, player 2 shows up first and doesn't have his score updated.
playerNum is the number of players, the +1 is to add a row for headings.. what the loop does is pick the next player from the active players group, and that way you go only over the active players and doesn't waste space on 6 players not present in game it gives you only the active players and doesn't waste space on not-active ones..
yes but they wanted that and secondly that trigger doesnt refresh itself so it would stay the same 0 kills the whole game
No, my point is, I tested it using the other guys method and when I played, he was player 2 and I was player 1. We both showed up on the leaderboard, but only I would update and it says he wasn't playing.
I'm gonna try some more trial and error.
Okay, here is what it looks like in-game:
There are 2 players in this match, me and the second player. The second player is the only one showing up on the leaderboard and it doesn't update his score. Only says he's 'Not Playing'.
Here's the init trigger:
and the unit dies trigger:
i forgot to do something try this
i can test it with you if you want
silencer.985 us
lets run the first - picked player = 1, he's playing
column 1 row 2 = name
column 2 row 2 = "0"
now lets go to the second player picked player = 2, as the leadeoboard tells you he's not playing so
column 1 row 2 = name
column 2 row 2 = "0"
now lets move to the unit dies trigger, player 1 kills a unit
picked player first is player 1, he's playing
column 1 row 2 = name
column 2 row 2 = "1"
next picked player is player 2, we already know he's not playing
column 1 row 2 = name
column 2 row 2 = "not playing"
now I have no idea what the "player = playing" actually means but I've got a feeling that the computer that represents player 2 (if it was a user on an online test I have no idea, off-line a user won't be in the active players group) isn't considered as playing