I’ve followed an online tutorial for a quick and easy random level generator based on pre-defined level ‘chunks’ but have run into a snag.
I’m trying to use the system to create two worlds, one above the other but have run into a snag.
The first half of the world generates fine, but the second half doesn’t fire after the first half has been generated.
The second part does however fire when it runs on it’s own.
This leads me to believe that for some reason the sequence isn’t firing.
Any suggestions or ideas where I’m messing up?
Sequence nodes don’t wait before they call the next wire. Just manually route the wire from the end of part 1 to the start of part 2.
For that matter, loops don’t wait for the loop body to finish prior to proceeding to the next iteration.
Hmm, that didn’t seem to work. Any other reason it might be falling over?
Well, I would say that Sequence nodes do in fact fire the second wire after the first one is through.
Otherwise a lot of my own logic wouldn’t work and the Sequence node itself would be useless.
Now, what could lead to a second half of the SAME code not working if called together with the first part?
Hm, let’s see, is there maybe something that should be unique? Something that is even called “unique”?
Maybe something like an Instance Name that you are setting to “INDEX1xINDEX2”?
Na jokes aside, do you maybe use the same names for the Instances? I see you combine the Loop indices
with an “x” in the Append node. Is the lower half of the code using the same Loop indices and maybe just not creating the instance
due to reusing the same name?
Beauty! Changed the x to a y and presto, worked. Amazing. Thank you both.
Could be wrong, but testing on my end has indicated that Sequence nodes only ensure that the very first function/event/node in the execution chain on a higher (position) branch get called before the very first function/event/node in the execution chain on lower (position) branches. The order they’re called in is preserved, and can be relied on. However, there is either no delay, or a very short delay, and the node does not wait for it’s top branch to finish before proceeding to the next branch.
Order (of being called) is preserved. But if your top branch takes too long and your bottom branch relies on data from the top branch’s execution- things can go wrong.
That being said, I totally missed the actual error here.
In all fairness I didn’t included a screenshot of the second function so it was easy to miss.