I am currently working on a minecraft 2d like clone and in my generation code I would like to spawn trees that are comprised of multiple blocks in a certain pattern. I have looked it up and haven't really found anything. Now I understand that I could have multiple create objects actions in an event in a function but I would like something a little bit cleaner. Maybe something stored in a JSON files and uses an array to extract the JSON info and create a tree in the game at a starting position.
You could use a container to spawn all parts of the tree or you could spawn the tree base and with that object on created spawn the other parts at various image points on the tree base using the spawn action.
Develop games in your browser. Powerful, performant & highly capable.
The hierarchies feature is good for this. Set up the objects in a hierarchy and you can create the entire hierarchy at once. Combined with templates, you can also choose between a set of different hierarchy options too.
Is there a example project available so I can look at the code and break down each part or are you able to create a example project for me to look at?