Attention | Topic was automatically imported from the old Question2Answer platform. | |
Asked By | ThreeSpark |
I am trying to create procedural generation for my game. Essentially what I want is, an island will spawn, and below that, a random island would spawn, and below that, a random island would spawn, etc. The way I am trying to do this is by choosing a random number and instancing a scene based on the number. Island1 can instance island2, which can instance island1 and island 3, and island 3, which can instance island1 and island2. I’ll eventually add more islands, but at the moment I’m trying to figure out procedural generation first. This isn’t working - it will always display an error saying I can’t preload a certain island. I’m guessing that preload can’t load the node that is calling it or parents of the node that is calling it, so I tried doing get_parent().add_child() instead, which yielded the same results. Can someone help me?
are you able to upload the project files? it’s hard to say without seeing what is actually going on.
Eric Ellingson | 2019-07-28 22:29
Sure. I don’t think it’s a problem with the files, though. Like I said before, as far as I can tell, preloading does not work if you are trying to preload the node the script refers to, or a parent of that node - I just need to find a work-around to this.
Anyways, here are the files:
Bad Egg – Google Drive
ThreeSpark | 2019-07-28 22:56