Unlocking/giving skills and skills w/ different targeting

What are the ways to unlock/give player characters skills?
I have made skills and the method I used when using those skills is by Spawning the Actor(Skill BP). The problem I’m having is these skills have different ways of spawning the actor/targeting enemy actor. For example, 1 skill will automatically home in on the nearest enemy while another 1 will travel in a straight line. How can I make so when the player is using a skill, I can assign the different ways targeting?

P.S : I’m not asking about how to make the targeting system. I already did that part.

It’s not easy to say since I’m not sure how you’ve implemented the system…

I’ll assume your system is modular- meaning any targeting can be applied to practically any skill. If that’s the case, you can simply use an enum (set the variable to expose on spawn so you can set it when you spawn the skill actor) and switch off of that to implement it.

2 Likes

Enums. It will be like a state machine. Your character will need a reference to the current skill. The current skill will hold an enum of the targeting type it is. Your character then changes its targeting state based on this.

Jinx :smiling_face_with_three_hearts:

1 Like

Thanks. What about unlocking the skill/giving the character ability to cast the skill?

That’s a lot more logic to it than anything someone could explain. It would depend on your implementation and game design.

Hmm… would using the Interface work? like how I use it to send a message to PlayerBP and get health damage?

It would entirely depend on how you need it to be implemented. There is a lot more to it than just a simple answer.

Thanks guys. Also, I was able to solve the unlocking skills problem :slight_smile: