One more thing if you don’t mind…
After each level is played, at the end, when the user runs out of ammo, I end the level with a widget (EndLevel). In the widget, I connect to the GameInstance and check to see if all the targets were destroyed.
If Yes → means level is completed. → Load Next Level (Level Name)
If NO → level is not and can be restarted.
I am using this widget for the ending of every level (Level1, Level2…)
How can I make a generic code so that I can set the next level to be loaded in the GI?
I always know the current level, but I need to be able to setup a variable for the next Level Name. Level1->Level2->Level3. Either a concatenation, or some sort of keeping track.
I.E.after Level2 which is the next to load… since I’m using the same widget at the end of each level.
Hope I’m not making it too confusing
Sort of like…
if current level is L1 - Level Name = L2
if current level is L2 - Level Name = L3
…
so on