Hi all, first time poster so not sure if I posted this in the right place but hopefully someone can help…
I am having an issue with getting the Wave number/zombie count to display on the second level of a little project I am tinkering with while learning this awesome piece of software.
Ok, firstly the project is based on a tutorial which sets up the basics of a wave based zombie shooter (Create a Zombie First Person Shooter Game | Unreal Engine 5 Beginner Tutorial - YouTube) . I followed along and was impressed so thought I would expand on it and develop it further with my noob skills.
Everything displays fine on the first level and allows you to complete it then when you select next level thats when the problem starts. No zombie or wave numbers display and only the first wave of zombies spawn. The blueprint code for level 1 and 2 is identical (apart from zombie spawn locations and model reference).
Is it a case of when you reach the end of level 1 “Win” you have to put some type of reset command at the start of Level 2 to set the wave back to 1 and original spawn quantity?
Fingers crossed someone has an idea what I am waffling about and can point me in the write direction to a solution…
If you use multiple levels thats win level and game level then you might have to use the Game Instance blueprint. Else all you have to do is hide the win screen and Onclickedretry cast it to the game mode and set the wave number to 1.
Thanks for the reply.
I must have something conflicting somewhere as if you retry stage 1 (if you get killed) everything resets, spawns and displays as it should but if you go onto the next stage only part of the UI loads (health/ammo) but still no wave or zombie count.
Ive tried the set wave to 1 with no luck. Bit of a head scratcher as the blueprint info for stage 2 (level/gamemode) is a duplicate of stage 1 (but with different models/spawn points).
To be honest i’m way out of my comfort zone as only started exploring UE5 for the video vfx capabilities and fell down the developing rabbit hole and became hooked haha
If you Duplicated Game modes, I would check to see if you have references inside the Game mode that need Replaced. I wouldn’t have Duplicated the Game mode and Just used the same one. Or if that isn’t the case when you click on level details you may see that the level defaulted to your first “Game mode” and needs changed to second. Definitely watch Videos about “Game Mode” and “Game Instance” you know get a small description of the two. I’m happy that you have decided to learn Unreal and I hope you have an easy time fixing your issue.
Hi Iroidhdr17, sorry for the slow reply. Here is a screenshot of the GameMode blueprint for the first level.
The tutorial I followed to build this was basically a one level project so it left me hanging on how to proceed. I’m guessing i’m missing something to maybe reset everything to go into level 2 and my theory of having another game mode for the second level to force to start from scratch is mega wrong.
Yeah as i’m slowly picking things up i’m learning that whilst things may seem to compile ok there could be conflicts going on.
I will definitely have a hunt about for those videos you mentioned. Hopefully I can crack the issue and get back to building.