This site works best with JavaScript enabled. Please enable JavaScript to get the best experience from this site.
Hi all!
I'm working on creating a scenario in which there are two factions, attackers and defenders.
Picture it like a "capture the flag", during which players from either side kill those of the other and earn points for doing so.
Those points are to be measured collectively for the team, not for every individual player.
My issue arises when I attempt to setdisplay the teams' killcounts.
Currently, my commandblocks are set up as follows:
#1: /scoreboard objectives add playerKills playerKillCount "Kill"
#2: /scoreboard objectives add KillsbyDefenders dummy "Kills"
#3: /scoreboard objectives add KillsbyAttackers dummy "Kills"
---
#4: /scoreboard objectives setdisplay sidebar.team.gold KillsbyDefenders
#5: /scoreboard objectives setdisplay sidebar.team.dark_red KillsbyAttackers
#6: /scoreboard players operation @a[team=Defenders] KillsbyDefenders= @a[team=Defenders] playerKills
#7: /scoreboard players operation @a[team=Attacker] KillsbyAttackers = @a[team=Attackers] playerKills
*The team colours are correct.
Although the individual players (i.e. teams) are displayed, the objective does not get any values added to it.
I manually tested this by overriding both objectives (KillsbyDefenders & KillsbyAttackers) and it worked.
When leaving it to the mechanism however, it does not.
I have found some discussions on the topic, but they were mostly outdated and did not help me in solving this.
I'd be very grateful for any help in this matter.
Flib.
I think the best way to achieve this is simple by the use of tags
Player on the attacking team gets AttackTeam tag
Player on the defending team gets DefendingTeam tag
then test for two conditions: 1. players has killed another player 2. player is on said team
Then I would manually use the execute to add the score to the team of the player.
Need any more help either reply or msg me on discord (Justinlp#0222)
Hi all!
I'm working on creating a scenario in which there are two factions, attackers and defenders.
Picture it like a "capture the flag", during which players from either side kill those of the other and earn points for doing so.
Those points are to be measured collectively for the team, not for every individual player.
My issue arises when I attempt to setdisplay the teams' killcounts.
Currently, my commandblocks are set up as follows:
#1: /scoreboard objectives add playerKills playerKillCount "Kill"
#2: /scoreboard objectives add KillsbyDefenders dummy "Kills"
#3: /scoreboard objectives add KillsbyAttackers dummy "Kills"
---
#4: /scoreboard objectives setdisplay sidebar.team.gold KillsbyDefenders
#5: /scoreboard objectives setdisplay sidebar.team.dark_red KillsbyAttackers
---
#6: /scoreboard players operation @a[team=Defenders] KillsbyDefenders= @a[team=Defenders] playerKills
#7: /scoreboard players operation @a[team=Attacker] KillsbyAttackers = @a[team=Attackers] playerKills
*The team colours are correct.
---
Although the individual players (i.e. teams) are displayed, the objective does not get any values added to it.
I manually tested this by overriding both objectives (KillsbyDefenders & KillsbyAttackers) and it worked.
When leaving it to the mechanism however, it does not.
I have found some discussions on the topic, but they were mostly outdated and did not help me in solving this.
I'd be very grateful for any help in this matter.
Flib.
I think the best way to achieve this is simple by the use of tags
Player on the attacking team gets AttackTeam tag
Player on the defending team gets DefendingTeam tag
then test for two conditions: 1. players has killed another player 2. player is on said team
Then I would manually use the execute to add the score to the team of the player.
Need any more help either reply or msg me on discord (Justinlp#0222)