Member
Level 6
Apprentice Miner
0

Forum Posts

1 - 2 of 2

    ElJazzMaster
    04/14/2020 1:55 pm
    Level 6 : Apprentice Miner
    history
    Alrighty I see your problem.

    execute as @a[​team=L1] if score @s L1kills > 0 L1Kills run team join L2 @s

    Changing it to

    execute as/at @a[​team=L1] if score @s L1kills matches 1.. run team join L2 @s

    should work, and here's why.
    I put as/at because I still haven't quite figured out what the difference is, but at has always given me less trouble. But my point is, I'm too lazy to put any research into the exact mechanics of at and as, so I just interchange them when troubleshooting to see if it works.

    But the real part of the problem comes in here: " @s L1kills > 0 L1Kills" It is looking to compare @s to another player NAMED "0".

    And it lets you do this because you could in theory create a fake Player to store Objectives/Scoreboards in. (I do this all the time, except I try not to name it a number.) So, what you can do instead, is check to see if it MATCHES, a certain number. Checking to see if it matches 1 should work for you, but if you're playing it safe, you can see if it matches "1.." Adding two little dots makes it an open range, here are some different examples for number ranges:

    matches 1 (Just sees if it matches 1)

    matches 1.. (sees if it matches 1 or any number greater than 1)

    matches 1..10 (Sees if it matches any number between 1 and 10)

    matches ..10 (Sees if it matches 10 or any number less than 10)

    I use matches more than operator signs, because you can only really use operator signs to compare two different players and their objectives.



    I hope this helped!
    2
    ElJazzMaster
    04/13/2020 7:47 pm
    Level 6 : Apprentice Miner
    Your 36 Command blocks would no doubt work, and that's the approach I would take if my mind hadn't immediately gone to the Objective that minecraft has, "teamkill.<color>" and "killedByTeam.<Color>." The teamkill.blue Objective increments for a player whenever that player kills another player on a team that is blue.



    So you could have each color be it's own level, for example:

    Aqua = Level 1

    Blue = Level 2

    Yellow = Level 3

    Etc..

    Red = Level 6



    So you could then set it up to be, if someone kills someone on the Yellow team, you compare that players team, and if it is 3 or Lower, you Level them up, otherwise, you reset everything.

    Taking this route, however, it would be much easier to have a Scoreboard named Level, and If the level = 1, put that player on team Aqua, if the level = 3, put that Player on team Yellow, etc.



    Hopefully all of that made sense, and if so, hopefully it's helpful.
    2

1 - 2 of 2

Welcome