#Function Delay

1 messages · Page 1 of 1 (latest)

compact yew
#

When giving an entity a tag in a function, the function is not able to detect that tag on that entity until at least one tick passes, meaning it cannot be detected later (using /execute as @e[tag=_]) in the same function file. Anyone know how to get around this?

dense pond
#

Huh? for real?

this doesn't work?

tag @s add test
execute if entity @s[tag=test] run say success
compact yew
#

correct. Specifically,
tag @r[type=armor_stand,name=test] add active
execute as @e[type=armor_stand,name=test,tag=active] at @s run ...

dense pond
#

weird

#

which minecraft version?

compact yew
#

It only works if those two lines I gave as an example are in separate functions and execute on separate game tics

#

1.20.0

dense pond
#

is it on realms?

compact yew
#

nope, just a singleplayer world

dense pond
#

give me a sec (I mean like 10 minutes to do some testing)

plain edge
#

If that is true, would break everything

compact yew
#

Ok my bad, I just tested it again and it worked as it should have. To be fair, I had an amazing function pack that generated random dungeons, but it never worked because of this issue, but that was in 1.18 and 1.19, I never tested it in 1.20. Thanks for your help!

dense pond
#

What was the issue? I'm curious

plain edge
#

Prob should delete this whole forum... not to cause mass testing panic

compact yew
#

I can't show you the original scripts that had these problems, because I was so mad I deleted them 😶 . The problem was it would select an armor stand at random, give it a tag of "active", and generate a dungeon room off of it. However, the function never worked because it could never detect the entity with the tag because it didn't allow a game tick to go by

#

So it never generated a room of the dungeon because there was no "active" armor stand for it to find