just like the name says! i have a box collider and when i hit it to restart the level i want to be down a life, but… when i hit it the level just restarts with my stock amount of lives! Pls Help
What you need is the GameInstance.
I guess you know how to handle your own GameMode? There is no difference in usage of the GameInstance.
- Create a new Blueprint class and select “GameInstance” as parent class. Call it (e.g.) “MyGameInstance” or so.
- Put your Variables (e.g.) “Life” in there.
- Now you need to tell the Engine to use your Blueprint: Project Settings → Maps&Modes → And at the bottom you will find the Dropdown where you can select your GameInstance Blueprint.
- And here we go: From now on you can access your Life-Variable like this without losing the stored value on level restart:
hope that helps Marooney
that worked perfect thank you
You are welcome
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 Thanks