1. Hello Hypixelers!
    I'm building a map, and I've already posted some Code Creations threads about it...
    I created a scoreboard called Deaths that is actually just a normal DeathCount. I wanted to do:
    execute if score @a[team=Attackers] Deaths > 1 Deaths run ...
    First:
    I had to say 'Deaths' two times, and I don't know if that's suppose to be like that.
    Second and way more important:
    @a[team=Attackers]
    It says:
    [14:41:28] Only one entity is allowed, but the provided selector allows more than one.
    Which means I can't put more than one entity in the selector. And that's NOT OK. I'ts really important. Please tell me what to do, and if you know tell me also why doesn't it allow me to put more than one entity at the command.
    Thanks, Creenel.
     
    #1
  2. I tried also
    execute as @a[team=Attackers] if score @s Deaths > 1 Deaths run ...
    But the same thing happend.
     
    #2
  3. Then now I had a flashback and I discovered I didn't join the Attackers team that time...
    and I tried this:
    execute as @a[team=Attackers] if score @s Deaths < 1 Deaths run tellraw @a {"text":"Hi"}
    Then I joined the Attackers team...
    typed /kill @p 3 times...
    and nothing happend.
    What can I do??
     
    #3
  4. You are trying to run a condition on multiple players and this is why it's not allowed, so you need to check after with @s as you did here:
    but the error is that you can't compare a score to a number, when you write 1 in a command, the command block will search for a player with the name "1". So you need to create a fake player, like Death_Count_Number, with a score of 1 and compare to it and it will works :)

    PS: You can create a new objective called Constants, where you can store all constants like this.
     
    #4

  5. Well....
    That looks difficult...
    Can you please give me a list of commands and write after each other: Activate once/Repeat
    So I can just insert them all?
     
    #5
  6. Or anyone else?
     
    #6
  7. You just need to run this command:
    Code:
    execute as @a[team=Attackers] if score @s Deaths > Fake_Player_Deaths Deaths run ...
    And be sure to set the score of Fake_Player_Deaths in Deaths to 1 ;)
     
    #7
  8. How do I create this fake player?
     
    #8
  9. You just need to write the player name instead of your name, so:
    Code:
    scoreboard players set Fake_Player_Deaths Deaths 1
     
    #9
  10. Ho, nevermind. But how do I remove Fake_Player_Deaths?
     
    #10
  11. You shouldn’t hide command blocks with test commands. If you want you can search it with external applications like McEdit.
    To remove Fake_Player_Deaths you just need to reset its score, using this command:
    Code:
    /scoreboard players reset Fake_Player_Deaths Deaths
     
    #11
  12. Thank you VERY VERY MUCH and sorry for annoying!
     
    #12
  13. That's way less important but if you know it would be really nice if you tell me how can I Undisplay the fake player,
    so no one could see it in the sidebar?
     
    #13
  14. You just need to create a new objective, and compare players with the fake player on that objective:
    So first create an objective :
    Code:
    /scoreboard objective add constants dummy
    Then set the score to fake player to 1 in this objective and just compare players to this constant with this command ;) :
    Code:
    execute as @a[team=Attackers] if score @s Deaths > Fake_Player_Deaths_1 constants run ...
     
    #14
  15. Ho, thanks.
     
    #15

Share This Page