You can have an armor stand that the entity will be looking at, and you make it move when you want the entity to turn, and be immobile when the player is reorienting himself
execute store result score #TAGGED nb_tagged_tmp run execute if entity @e[tag=your_tag]
execute if score #TAGGED nb_tagged_tmp < #TAGGED nb_tagged run say "tagged dead"
scoreboard players operation #TAGGED nb_tagged = #TAGGED nb_tagged_tmp
The first command count how many entity has the tag "your_tag" and store it in nb_tagged_tmp score
Then it compares it with nb_tagged score, which is how many tagged entity you had one tick earlier. If the score is lower, then you have a dead tagged entity
and finally you put nb_tagged_tmp in nb_tagged for the next tick.
First command block in repeat always active unconditional and the rest in chain unconditional always active.
/execute store result score #SCOREBOARD nb_players run execute if entity @a[x=200,y=17,z=198,dx=10,dy=1,dz=10]
"execute store result score #SCOREBOARD nb_players" mean that you will store the result of the following command in the "nb_players" 's score of #SCOREBOARD (a fake player here, but you can choose an entity)
"execute if entity @a[x=200,y=17,z=198,dx=10,dy=1,dz=10]" search for players at x=200, y=17, z=198 in a square of 10x1x10
You will need to create the score before that with :
So let's assume that bottom left is 0 17 0 and top right is 10 17 10 (coordinates)
First chain of 3 :
execute positioned 0 17 0 as @a[dx=0,dy=0,dz=10,tag=!pool_bottom] run scoreboard players add @s pool_points 50
execute positioned 0 17 0 as @a[dx=0,dy=0,dz=10,tag=!pool_bottom] run tag @s add pool_bottom
execute positioned 0 17 0 as @a[dx=0,dy=0,dz=10] run tag @s remove pool_top
Second chain of 3 :
execute positioned 10 17 0 as @a[dx=0,dy=0,dz=10,tag=!pool_top] run scoreboard players add @s pool_points 50
execute positioned 10 17 0 as @a[dx=0,dy=0,dz=10,tag=!pool_top] run tag @s add pool_top
execute positioned 10 17 0 as @a[dx=0,dy=0,dz=10] run tag @s remove pool_bottom
chain of 2 :
tp @a[scores={pool_points=200},tag=!pool_finished] 200 17 200
tag @a[scores={pool_points=200},tag=!pool_finished] add pool_finished
What does it do ?
You check if the player reached the top bottom of the pool. If yes, it add 50 points, then add the tag pool_top. With the tag, the player can't have points anymore if he reach the top. It then remove the tag pool_bottom, which means that your player can now gain point when he reach the bottom.
It does the same for the bottom of the pool, but inversed, it add pool_bottom tag and remove pool_top.
The chain of 3 command blocks has to be : "repeat unconditionnal always active" for the first, and the two others "chain conditional always active"
The chain of two command block is when the player reach 200 points. It tp the player and add him the tag pool_finished.
The first one has to be "repeat unconditional always active" and the second "chain conditional always active"
How does it know when a player reach the bottom or top line? It's thanks to dx dy and dz, when you specify "positioned 10 17 0 as @a[dx=0,dy=0,dz=10]", only players on the line 10 17 0 to 10 17 10 are concerned.
^ ^ ^ is about your point of view, for exemple, ^ ^1 ^1 aims at 1 block away and 1 block above your point of view. Note that it start at your feet, if you want iit to start at your eyes, you have to add "execute anchored eyes run [command]"
If you want to know which player has left the area, you can add a tag to all players who are in the area, and check every tick if they still are in :
add tag if player is in the area :
/tag @a[x=10,y=10,z=60,dx=20,dy=20,dz=70] add in_area
detect if the player has left the area :
/execute as @a[tag=in_area] unless entity @s[x=10,y=10,z=60,dx=20,dy=20,dz=70] run say "not in area"
and don't forget to detag players who are not in the area :
/execute as @a[tag=in_area] unless entity @s[x=10,y=10,z=60,dx=20,dy=20,dz=70] run tag @s remove in_area
0
You can have an armor stand that the entity will be looking at, and you make it move when you want the entity to turn, and be immobile when the player is reorienting himself
1
You can use the clone command to do that :
But there is a limit to how many blocks you can clone.
1
You can do that in only one command :
0
The first command count how many entity has the tag "your_tag" and store it in nb_tagged_tmp score
Then it compares it with nb_tagged score, which is how many tagged entity you had one tick earlier. If the score is lower, then you have a dead tagged entity
and finally you put nb_tagged_tmp in nb_tagged for the next tick.
First command block in repeat always active unconditional and the rest in chain unconditional always active.
you have to create the scoreboard with :
1
0
"execute store result score #SCOREBOARD nb_players" mean that you will store the result of the following command in the "nb_players" 's score of #SCOREBOARD (a fake player here, but you can choose an entity)
"execute if entity @a[x=200,y=17,z=198,dx=10,dy=1,dz=10]" search for players at x=200, y=17, z=198 in a square of 10x1x10
You will need to create the score before that with :
0
You can use this site : https://mcstacker.net/
0
You can put that in a bossbar to make a timer
0
To do your tellraw or execute command, I advise using https://mcstacker.net/
Your command has to be something like this :
0
Hey
So let's assume that bottom left is 0 17 0 and top right is 10 17 10 (coordinates)
What does it do ?
You check if the player reached the top bottom of the pool. If yes, it add 50 points, then add the tag pool_top. With the tag, the player can't have points anymore if he reach the top. It then remove the tag pool_bottom, which means that your player can now gain point when he reach the bottom.
It does the same for the bottom of the pool, but inversed, it add pool_bottom tag and remove pool_top.
The chain of 3 command blocks has to be : "repeat unconditionnal always active" for the first, and the two others "chain conditional always active"
The chain of two command block is when the player reach 200 points. It tp the player and add him the tag pool_finished.
The first one has to be "repeat unconditional always active" and the second "chain conditional always active"
How does it know when a player reach the bottom or top line? It's thanks to dx dy and dz, when you specify "positioned 10 17 0 as @a[dx=0,dy=0,dz=10]", only players on the line 10 17 0 to 10 17 10 are concerned.
Feel free to ask if you have questions
1
^ ^ ^ is about your point of view, for exemple, ^ ^1 ^1 aims at 1 block away and 1 block above your point of view. Note that it start at your feet, if you want iit to start at your eyes, you have to add "execute anchored eyes run [command]"
0
You can use the execute function :
1
If you want to know which player has left the area, you can add a tag to all players who are in the area, and check every tick if they still are in :
0
0
Sorry, I misread your message ^^'
You can't do that, you have to use another method.
One I can advise is to send a message to the closest player when someone click on the button, and in the message, put :
"Confirm clicking on button : Confirm", and on confirm, put a command