I made a vehicle selection option for my game. It works like a charm. One problem I have is that I want to create an unlock system such as “beat this level to earn X car” or some modest achievement like that. I honestly have no idea how to go about this. I do know I need to do this with a save/load system but I am always confused when it comes to the saving functionality.
I have an extremely hard time understanding how to save/load. I mean get the concept but I don’t get how to implement it on a complex note. I have seen tuts about this but the tuts I watched were about saving character location, score count, and number of clicks and nothing too sophisticated in which I was able to do no problem. I have not seen any tut so far that really dived deep into this subject matter. Most only offer sprinkles and bits of info.
What is the best way to implement an unlock system?
Now I am no expert in Blueprints nor a stray at using it. I can say I am comfortable with using it.
Easiest way without using DataTables for your car specs/infos etc.;
You can set a UnlockLevel/UnlockPoints variable for each car and you can block player to select/buy that car or hide car from store completely if player doesn’t have enough Level/Points.
I don’t know how you designed your car select system but, for example, if you spawn cars to StoreMap you can hide them after spawning by getting UnlockPoint and comparing with Player’s points. If player doesn’t have enough points you can simply use SetVisibility = Hidden.
Other way to do this is using DataTables. Which means, you hold car info such as UnlockPoint, Price, MaxRPM, VehicleClass etc in a DataTable and while listing cars on store, you can compare UnlockPoint from DataTable and Player’s Points and if player Point’s are lower than UnlockPoint you may not spawn vehicle at first.
Another easier method of DataTables can be this;
Instead of using complex DataTables you can make an Float array.
CarUnlockPoints variable, Float, Array
and so on. Each Index can point to a car.
Index0 => Mustang
Index1 => Camaro
Index2 => Sephia <3
depends on your way of sorting cars.
Rest is same as DataTable option.
You have 2 options.
-Spawn cars. and hide after comparing point variables. Or you can keep showing but blocking vehicle to be possessed.
-Compare point variables and don’t spawn car.