How to make lock and unlock button for levels?
I am making a game which contains 8 level, so when the levels are locked the button color is different or icon is different . and you can also help me with any other idea which relate with this.
I want to make like this
asked Apr 15 '19 at 06:30 PM in Blueprint Scripting
Im new to Unreal myself, but my first attempt would be to create a Game-mode Boolean Variable Array. You have 8 levels so you would have indexes 0-7 and you could set the Boolean for each index indicating if level is unlocked. The array would be set on begin-play reading values from a save (Never done this yet). Your UMG level icons would be variables and you could set the image according to the Boolean value in your array. You could get then enable or disable interaction according to your array Boolean?
answered Apr 15 '19 at 06:47 PM
You can do something like this. Create an integer variable in the game instance. Each time a player beats a level you increment it (+1 to the value) and set it. When you open up the main menu with the level selection, enable or disable the buttons based on whether or not they are greater than or less than or equal to this value. Sample setup is below. If you are new to UE4 you can also check out these beginner tutorials they may help you with questions/issues you have in the future. It also gives a really good foundation for the basics of blueprints and setting up logic.
answered Apr 15 '19 at 09:30 PM
Nebula Games Inc
Don't forget you will also need to create some type of save variable to archive the players progress for a later load up.
answered Apr 16 '19 at 07:09 AM
Follow this question
Once you sign in you will be able to subscribe for any updates here