#Game level not loading correctly

3 messages · Page 1 of 1 (latest)

undone plaza
#

First some questions:

  • is this happening for this one specific level?
  • Do you have an example of another level where the layout is different from the one you're currently showing where this is happening as well?
  • If you have code for level transitions, could we please see that?
  • Do you have a script or something that's part of "autoload" that we could take a look at?
  • Do you have anything that limits how many enemies are allowed in one screen?
  • Do you have some functionality to check how many enemies are supposed to appear in the screen?

I personally don't think I can answer the question you have but by answering these, maybe someone else might be able to slouth it out?

sturdy shuttle
#

no it is happening for different levels
no limits for enemies and no functionality to check enemies
sometimes all enemy are loading perfectly
first image all enemy are loading in game from previous question
next two images first one is from game and second one is from scene the problem is same
last image is of my autoloads and last file contains code for level change

undone plaza
# sturdy shuttle no it is happening for different levels no limits for enemies and no functional...

A have a theory for a solution that I'm unsure if it's suitable for you or not:

  • You could for each level have a parent node called "Enemies", where every enemy for that specific level is a child of.
  • Depending on which level is loaded, you "activate" the parent node for the enemies for that specific level.

The possible issue I can think of is that, when a level is cleared from enemies, how do you check if that room is empty & stays empty (if that's a feature you want).

I have no clue if this is how you should do it or not but it could be a way to do it, for now I would wait & see if someone who knows more can perhaps point you towards a better solution.