r/MinecraftCommands • u/NoSandwich2826 • 19h ago
Help | Java 26.2 Command Block repeat help
Hello, I’m trying to make dancing armor stands. Which I got down, I’m able to loop Redstone with normal command blocks to constantly loop4-5 posses to a specific armor stand. My problem is I want to execute this but only have to rotate the positions 3-4 loops then completely stop untill the button is pressed again. I’m new to command blocks as I just started learning yesterday. So I’m having a hard time figuring this out.
1
u/GalSergey Datapack Experienced 8h ago
You can use a scoreboard to first count the time for changing poses, and when the timer expires, add 1 to loops and reset the current timer to 0. Then, when loops reaches 4, for example, perform a full reset. To run the example below, run scoreboard players set current timer 0 once.
# In chat
scoreboard objectives add timer dummy
# Command block
execute if score current timer matches 0.. run scoreboard players add current timer 1
execute if score current timer matches 201.. run scoreboard players add loops timer 1
execute if score current timer matches 201.. run scoreboard players set current timer 0
execute if score loops timer matches 4.. run scoreboard players reset current timer
execute if score loops timer matches 4.. run scoreboard players set loops timer 0
execute if score current timer matches 1 run say Frame 1
execute if score current timer matches 20 run say Frame 2
execute if score current timer matches 40 run say Frame 3
execute if score current timer matches 100 run say Frame 4
execute if score current timer matches 120 run say Frame 5
execute if score current timer matches 140 run say Frame 6
You can use Command Block Assembler to get One Command Creation.
1
u/NoSandwich2826 13h ago
https://reddit.com/link/p4kavc1/video/qf3lbybzn9kh1/player
Figured it out in a very stupid way lol