How to pass variables to Ability?

Hi! I have an NPC and I want to tell him to use an ability in a certain point. I have troubles figuring out how to pass any params to the ability?
For example, I want him to throw a fireball at point A. How do I pass coordinates to the Ability when I call TryActivateAbility?

  1. I thought about setting variables in the AbilitySystemClass, but not sure about it.
  2. Also I thought using SendGameplayData but I could’t put vector anywhere.

Hey Ztreis, welcome to the forums!

Ok so to break this down we’re going to need some more info, screenshots would be amazing! So can you send some screenshots of the script for “TryActivateAbility”, and your AI Character’s relevant script for this?

Do you already have the AI determining what the vector will be? You may need to add an input of “Vector” to “TryActivateAbility” so you can pass it in.

Get back soon and let’s figure it out!

You can send him gameplay event with invisible actor located at needed point. Just listen to that event inside of the ability

You could make gameplay event data and send in a custom made hit result data and use that in the ability.