I was wondering if there is any way to get an actors type directly form the actor nodes in BP’s? At the moment i am just casting to the different AI types and if it fails, try cast to another until i find the right one. This could get a little tedious once there are a few enemies.
By type do you mean class (each enemy is it’s own BP) if so, yes, you can use the get class function. I assume there is some event that is driving your search, you might be able to get the instigator of that event then ask for its class. (I’m new to the engine myself so I’m not certian that was any help)
Bah, I should of thought of that. Still kind of leaves me with the same problem where i cant access its local variables unless i cast it and there is no way of really knowing what will show up. Thank you for your help clearing that up, it was helpful ![]()
Just wanted to suggest, in the case you want to call a function without having to cast or know the object’s class, you can always use a Blueprint Interface.
Hope that helps!
Yeah I’ve looked into that, but for each enemy has their own local variables id like to change in different ways. Thanks for that ![]()