#I'm trying to run an function only once when a score turns to 1 (or another number)

1 messages · Page 1 of 1 (latest)

formal oasis
#

I'm doing this so I can run a function that loops an animation (exported from BDE Engine website for animating display entities). Is there a way to do this without continuously running that function every tick, or a better way to go about running the animation function in general? Sorry if I sound a bit confused, I'm pretty new to datapacks

true sparrow
#

Could use an advancement

#

But without more context I don't think I can provide a better suggestion, I don't really understand the problem

formal oasis
# true sparrow Could use an advancement

Sorry, I shouldve been more clear lol. Right now I have an advancement that runs a function and it keeps repeating while i'm holding right click

But how can I execute a function to run once when the right click starts and ends (so I can play the animation then go back to playing the idle)

sudden sphinx
#

Conure dd a video a while back on how that can be implemented

#

Ironic that food is used in the "non-consumable" method...
Tutorial Datapack - https://drive.google.com/file/d/1V8vzT4ch0H2LMEPNH0JqZ1tb2u5a4dDF/view?usp=sharing
Consumable Right-Clicks - Knowledge Book Method https://youtu.be/13fTlAmGDqg?feature=shared

come hang out on Discord, if you feel brave enough https://discord.gg/pXyFR6mwxR

Ever want...

▶ Play video
#

Last one

formal oasis