Skip to main content

On Sale: GamesAssetsToolsTabletopComics
Indie game storeFree gamesFun gamesHorror games
Game developmentAssetsComics
SalesBundles
Jobs
TagsGame Engines

Good question!

Yes so having it this way solves some issues, but as you've discovered, can cause some others depending on what you are doing in your state new block.

It actually used to work the way you described, with the set default being a separate function.

There are a lot of ways to work around this, but the way you suggested would be totally okay.  You have all the scripts, if you feel it should work differently from the way it does, go ahead and change it!  Rip the set default out of the create script and split it out to its own function.  And you can prevent the setting of the default from running the state new if you'd like and see if that simplifies things for you (though you may find it causes more problems)