How can i keep a variable's value consistent throughout all the levels?
I have a coin variable for my player, and say i collect 5 coins and then die or exit to the main menu or exit the game, i want the coin value to add everything up so i can spend them in a store for items.
SKYPE: cjsavage56 (red shirt)
asked Feb 09 '17 at 06:55 PM in Blueprint Scripting
Check out the GameInstance Blueprint class.
It is a Bp where you can store and change variables that then will carried over from level to level.
It works like a regular Blueprint, but when you set your created Instance as the GameInstance i will then not be reset from level to level, and as such will be where you store your money variable, (and also where you store your bought items when you return to the world).
answered Feb 09 '17 at 09:04 PM
3 ........seconds to google it and find https://docs.unrealengine.com/latest/INT/Gameplay/SaveGame/
answered Feb 09 '17 at 07:39 PM
Follow this question
Once you sign in you will be able to subscribe for any updates here