Download

Casting to the actor that overlapped an object?

I am trying to create an actor that when overlapped, attempts to see if the actor which overlapped it has the “shield” variable. Than if it does increases it’s shield variable by some number.

I need to know how to do dynamic casting because there will be multiple actors that this could interact with.

In this case, I would instead use an interface with a function that sets your shield variable in each blueprint that you want it in. Then in your script here you set " has interface" and check to see if the overlapped actor has the interface you’re looking for, if so, continue with your script.