I have a level with several sublevels containing waves of enemies. When each wave is destroyed, I want to load the next sublevel. I’ve looked at Simple Geo and other examples, and they seem to use a Gamestate to keep a count of the enemies in the current wave. However, they use a complicated timer setup to have various blueprints query the gamestate rather than just bind a callback.
Is it possible to have my level blueprint bind to a gamestate event? I tried casting to my specific gamestate class in the level blueprint, but even then binding isn’t an option.
Is there a more standard way to handle this? Is the timer solution actually recommended, with all the manual cleanup, etc. that is involved in that?
What I would like is gamestate has an increase enemy count and decrease enemey count. When decrease enemy count takes it to or below zero, it calls a custom event “NextLevel”. I want the level blueprint to bind that event and on receipt, unload the current sublevel and load the next sublevel “wave” of enemies. Should I use blueprint classes instead of sublevels? The reason I’m currently using sublevels is so I can edit the wave’s enemy locations inside the map editor itself.
Is there a better approach?