Been trouble shooting this for a while.
Create a function loop with breaking criteria
execute unless entity @s[tag=break] if entity @s[scores={Count=..499}] positioned ^ ^ ^0.1 run function methods:test/loop
In the same file, create a command to run if loop breaks.
execute if entity @s[tag=break] positioned ^ ^ ^ run function methods:test/saysomething
Expected result, Breaking the loop causes saysomething to execute once providing a single message.
Actual result, Breaking the loop results in saysomething spamming the screen.
I do not believe the positioned tag has anything to do with it but I left it in to show how im using it.
( *** Edit *** ) It just occurred to me that this is not necessarily a bad thing as some functions may benefit from this sort of behavior. I would like to suggest actually making it official but activated by some sort of parameter at call time.
Comments 4
Well, I thought it was a work around however the function continues to advance the coordinates meaning even though i detected a non air block at ~ ~ ~ its now advanced past that so any testing at those coordinates is now useless.
Are the commands you have written in the description a part of methods:test/loop or a different function?
Have been fiddling and found a workaround. (*** I was wrong, its not a work around ***)