1

Why Is Is This Target Selector Argument Not Working?

User2969796G's Avatar User2969796G4/1/20 11:48 am
1 emeralds 237 1
4/1/2020 12:22 pm
Bertiecrafter's Avatar Bertiecrafter
Im creating a command wich is supposed to execute a message just once when a certain score is reached.
It worked once, but I made some changes to display a better word seperation by adding some whitespace in the text sections within the tellraw section. It stopped working from there, even as I undid, switched world etc. These are the commands I am using at the moment.
When I am changing the command to only execute when I am below or above a certain score (elytraFlight=5000.., elytraFlight=..5000) it works fine, but obviously keeps spamming.


/scoreboard objectives add elytraFlight minecraft.custom:minecraft.aviate_one_cm

/execute as @a[scores={elytraFlight=5000}] run tellraw @a [{"text":"[Abgehoben...]: "}, {"selector":"@p[scores={elytraFlight=5000}]"}, {"text":" flog 5 Meter!"}]


I dont want to reset the scoreboard - because I want to execute another command once a certain second score is reached.
Posted by User2969796G's Avatar
User2969796G
Level 1 : New Miner
0

Create an account or sign in to comment.

1

1
04/01/2020 12:22 pm
Level 70 : Legendary Engineer
Bertiecrafter
Bertiecrafter's Avatar
You will have to reset the score, otherwise the score will keep increasing past 5000 and trigger again.
You can put the reset score command after all commands you want to run once the score has been reached.

Consider grouping all commands that you execute once the score has been reached into a function. That way you don't have to check the score for every command.
Planet Minecraft

Website

© 2010 - 2024
www.planetminecraft.com

Welcome