Locking and Unlocking an ability behind a collectable

So my scan ability works pretty well and now I’m trying to keep it locked from the player being able to use it until they collect the scan ability collectable that is shown right here

I know how to destroy this actor and what not but I don’t know exactly how to lock the ability itself. Especially since the ability is from a material and not an ACTUAL blueprint

I have it linked to my key press in the character BP

The next part is connecting it to the Scan Ability BP so that I can create a function that checks if the ability is collected yet.

Am I going about this all wrong or am I just missing key points? Any help is definitely useful

Sounds fine but perhaps it is as simple as adding another false hasAbilityUnlocked boolean to the BP_Bot and setting it true once you collect it in the last pic. Then do AND here:


There are other, more advanced ways to grant abilities. If you’re planning on having 4 abilities in total the above is probably more than fine. If you’re planning on having 400, not so much.

For something more nuanced, you could take advantage of actor components. Or this:

Again, all depends on scope and how complex the thing is supposed to get.