So i have a pick up and scoring system that works. i collect the pick ups and it also registers to the HUD and counts them i now need to set a limit and check the game every time a pick up is collected until the set amount is reached then it opens the next level.
Hi there, i just put a quick simple solution together for you that should work fine in your case. Or if someone else stumbles across this question who does not have this at all at this point.
GameMode is the easiest way to count the score if you just got one player.
And the HUD can access the GameMode Score pretty easy as well.
Everytime the Score is increased, the limit will be checked and finally ScoreReached gets called.
In the ScoreReached event (just split this into a separate event to keep things clear) you can stick some win conditions and a delay in there if you wish.
But how does the GameMode know which level to load if the game mode is used in all levels?
Well this can be set by the LevelBlueprint. You can also define the required score for the level and other stuff that is different to all other levels.
If you need to keep track of values through out all the levels you need to create an own GameInstance BP inherited from the default GameInstance. Then set it in Project Settings → Maps&Modes → GameInstanceClass. You can access and store your values in there like in the GameMode but with GetGameInstance instead of GetGameMode.
I’m happy to help
Please check the answer as solved (on the left side below the arrows) to close this question for the answerhub-system and for people looking for unanswered questions thx
quick question i’m running into problems connecting the player blueprint to the addpickup node made in the game mode blue print also. how were you able to set the required score and connect its target. i don’t get that when i try to set the score and next level. the target node does not show up.