#Running functions on world init

1 messages · Page 1 of 1 (latest)

subtle narwhal
#

How would I run a function file on world init, but no other time. Is the only way to do it using a scoreboard command?

I’m on 1.20.12

stoic scaffold
#

you want to run a specific function file?

#

ex score = 1 run fil1?

subtle narwhal
#

Yea pretty much

stoic scaffold
subtle narwhal
#

i want to run when the world is created

#

without command blocks

stoic scaffold
#

you want to run a specific function file on a specific world?

subtle narwhal
#

i want to run a function file on any world that has the behavior pack when it is generated

subtle galleon
#

If you have a general scoreboard for your stuff... something like settings make a fake player, called World_Init something like that.... add 0, check it score is zero, if it is, do your thing... add 1. when the score reaches a certain high number, reset to 1. It should never go back to zero.

subtle narwhal
#

How would I make a fake player?

subtle galleon
#

Try it out to see.. you can have a scoreboard for just Fake Players (Variables) to keep track of things. The new execute made it possible to work with them better and not rely on using players to keep timers and such