• 🏆 Texturing Contest #33 is OPEN! Contestants must re-texture a SD unit model found in-game (Warcraft 3 Classic), recreating the unit into a peaceful NPC version. 🔗Click here to enter!
  • It's time for the first HD Modeling Contest of 2024. Join the theme discussion for Hive's HD Modeling Contest #6! Click here to post your idea!

Scoreboard not working for other players

Status
Not open for further replies.
Level 3
Joined
Jul 22, 2011
Messages
37
======================SOLVED===============
So, that's my temporary Scoreboard:
  • StatsShow
    • Events
      • UI - Player 1 presses Tab key Down with shift Allow, control Allow, alt Allow
    • Local Variables
    • Conditions
    • Actions
      • Dialog - Create a Non-modal dialog of size (764, 736) at (0, 100) relative to Top of screen
      • Variable - Set StatsShow = (Last created dialog)
      • Dialog - Create an image for dialog StatsShow with the dimensions (764, 736) anchored to Top with an offset of (0, 0) setting the tooltip to "" using the image Mainboard.dds as a Normal type with tiled set to True tint color White and blend mode Normal
      • Dialog - Create a label for dialog StatsShow with the dimensions (200, 50) anchored to Top Left with an offset of (100, 350) with the text (Name of player (Player 1 from Red Team)) color set to White text writeout set to False with a writeout duration of 2.0
      • Dialog - Create a label for dialog StatsShow with the dimensions (200, 50) anchored to Top Left with an offset of (275, 350) with the text (Text(Kills[(Player 1 from Red Team)])) color set to White text writeout set to False with a writeout duration of 2.0
      • Dialog - Create a label for dialog StatsShow with the dimensions (200, 50) anchored to Top Left with an offset of (335, 350) with the text (Text(Deaths[(Player 1 from Red Team)])) color set to White text writeout set to False with a writeout duration of 2.0
      • Dialog - Create a label for dialog StatsShow with the dimensions (200, 50) anchored to Top Left with an offset of (380, 350) with the text (Name of player (Player 6 from Blue Team)) color set to White text writeout set to False with a writeout duration of 2.0
      • Dialog - Create a label for dialog StatsShow with the dimensions (200, 50) anchored to Top Left with an offset of (555, 350) with the text (Text(Kills[(Player 6 from Blue Team)])) color set to White text writeout set to False with a writeout duration of 2.0
      • Dialog - Create a label for dialog StatsShow with the dimensions (200, 50) anchored to Top Left with an offset of (605, 350) with the text (Text(Deaths[(Player 6 from Blue Team)])) color set to White text writeout set to False with a writeout duration of 2.0
      • Dialog - Show StatsShow for (All players)
      • General - Wait 5.0 Game Time seconds
      • Dialog - Hide StatsShow for (All players)
Nevermind the whole tab+5 seconds wait thing, I'll think about that later.
What's important here are the create label triggers. For player 1 I have Name:Kills:Deaths, simple. It works fine. If I kill, it increases the number, If I die, it does that as well.
Now when I enable player 6, give him a unit and enable those 3 triggers, it doesn't work. In an online lobby it just doesn't show up, in local testing it says this:
unbenannt73r7b.png

Now the first line refers to the Player name, the other refers to Kills and Deaths (negative array indexes not supported), figured that out by disabling the K/D labels.
So, what does that mean? Is there something wrong with my player 6 setting? Why does Player 1 work? I'm trying to find out with deductive ways, no luck so far.
//edit: I gave player 2 the same unit that player 6 has. Now, everything works fine with player 2 as well. He has also a name "Player 2" while 6 (the first one in the enemy team, it's a 5on5 map) has none. It just says "Warlord killed " while here it refers to Player 2 as Player 2 and not just blank.
//edit2: Well, player 2-5 was set to computer (Player Properties). I did that earlier to let my friend join Slot 6 because otherwise it wouldn't let him, it would always put him to player 2 and wouldn't let me drag him to Team 2.
Now, I changed Player 6 to computer as well, he has a name now (Player 6) that properly shows up if I kill him but the problem remains the same.
Should you ask: Yes, I've a trigger that assigns each player to Red or Blue Team.
  • Player Group - Add player 1 to Red Team
  • Player Group - Add player 6 to Blue Team
So they're both in there.

P.S.: The error reporter and the whole "error in line 345". That's quite obvious in general coding like java etc. but how do I look at the code of my map to figure out where line 373 is and what it says.
I know there was some option to look at the source code but I got there by accident. I'm quite new to the SC2 editor so I can't know.
P.S.2: Another thing; for example, someone posts a trigger in text like I did above. There is/was (at least in WC3) an option to paste this text in a trigger, how do I do that in the SC2 editor?
 
Last edited:

Dr Super Good

Spell Reviewer
Level 63
Joined
Jan 18, 2005
Messages
27,188
P.S.: The error reporter and the whole "error in line 345". That's quite obvious in general coding like java etc. but how do I look at the code of my map to figure out where line 373 is and what it says.
Use the script viewer.

P.S.2: Another thing; for example, someone posts a trigger in text like I did above. There is/was (at least in WC3) an option to paste this text in a trigger, how do I do that in the SC2 editor?
WC3 never had such an option for GUI, only JASS. SC2 offers similar support for galaxy script.

My big question is...
Why not staticly reference the player? Why are you getting him from a player group?
 
Level 3
Joined
Jul 22, 2011
Messages
37
I have a headache now, my head is trying to understand it's own stupidity.
What I did:
>have 2 teams á 5 players
>assume that everyone goes from 1-10
>first trigger: player 1 from Red Team (Red team = 1-5)
>second trigger: player 6 from Blue Team (Blue Team = 1-5 as well)
There is no player 6 in the blue team, it's not possible. The "pick player from player group" takes the first player IN this group. Which means, player 6 in the main game, is player 1 in the blue team. Simple as that.
 
Last edited:
Status
Not open for further replies.
Top