How can i make 3 lives in ue4 and loss one when die and reload level?
Id create a “lives variable” in your saved game, and decrement it each time the player dies
3 Likes
I agree, run the saved game through your game instance so you can load it each time.
1 Like
how i can add variable in savegame?
go to the instance and add a variable.
First you have to create a saved game object, if you haven’t yet, set up a game instance BP, created a saved game BP, and creat an object reference of the saved game in your game instance. From your saved game BP you’ll want to create a “lives variable” probably int. And setup a save function for decrementing and setting the variable. There are numerous tutorials on YouTube for setting up a saved game system, id check one out it’s pretty easy