So I'm making a capture the flag type map and am having a problem with the scoreboard. Since this map isn't going to be filling instantaneously I made it to where the teams are dynamic, so you can easily make even teams or w/e. But with that, the player numbers easily get mixed up so just running a loop for every player and inserting them into their respective rows, gives a messy scoreboard. I have come up with a workaround, not entirely sure it's efficient though. You can find my map on my profile, it should be unlocked. The stuff I want on the leaderboard is a unit state icon.
Here is the code for where the scoreboard initializes and inserts all the data into the individual rows:
The errors I receive are as follows, keep in mind this is me testing with computers set for just players 1 and 9, I am set for player 2. Teams should have been 2 in team 1 and just myself in team 2. I also got the same results when I started with full computers and I was set to player 14. Full teams, me set for last:
EDIT: Through further testing, weird stuff has happened. Like ugh, I have created a mess of a map. Examples of the weird stuff, values don't get updated into the right slots; when i have full teams on bnet, all the player values are displayed, without full, 2v2 and I am in team 2 (player 1), no names are displayed and nothing updates. So through even more testing, it appears in 4v4, the initialization is wrong, but the updates are correct, however it doesn't update for team 1, except me.
Just an update, did a revamp with a "group row" workaround, much easier however I still can't get player names to line up with the rows and much less get all of them on the board. It might be something more to do with me testing with full houses of just computers but whatever. Something about groups before made me think it would mess with row numbers, now I have learned that is not the case.
So no longer have a negative array problem but a name problem.
EDIT: In an attempt to keep the amount of posts at a minimum, I have solved my problem now. It's now almost simple enough to where I feel stupid.
So I'm making a capture the flag type map and am having a problem with the scoreboard. Since this map isn't going to be filling instantaneously I made it to where the teams are dynamic, so you can easily make even teams or w/e. But with that, the player numbers easily get mixed up so just running a loop for every player and inserting them into their respective rows, gives a messy scoreboard. I have come up with a workaround, not entirely sure it's efficient though. You can find my map on my profile, it should be unlocked. The stuff I want on the leaderboard is a unit state icon.
Here is the code for where the scoreboard initializes and inserts all the data into the individual rows:
I have put in tracer messages throughout the 2nd loop and found that the the trigger quits after the 3rd go around on this action:
The errors I receive are as follows, keep in mind this is me testing with computers set for just players 1 and 9, I am set for player 2. Teams should have been 2 in team 1 and just myself in team 2. I also got the same results when I started with full computers and I was set to player 14. Full teams, me set for last:
Any help is greatly appreciated.
EDIT: Through further testing, weird stuff has happened. Like ugh, I have created a mess of a map. Examples of the weird stuff, values don't get updated into the right slots; when i have full teams on bnet, all the player values are displayed, without full, 2v2 and I am in team 2 (player 1), no names are displayed and nothing updates. So through even more testing, it appears in 4v4, the initialization is wrong, but the updates are correct, however it doesn't update for team 1, except me.
Just an update, did a revamp with a "group row" workaround, much easier however I still can't get player names to line up with the rows and much less get all of them on the board. It might be something more to do with me testing with full houses of just computers but whatever. Something about groups before made me think it would mess with row numbers, now I have learned that is not the case.
So no longer have a negative array problem but a name problem.
EDIT: In an attempt to keep the amount of posts at a minimum, I have solved my problem now. It's now almost simple enough to where I feel stupid.