If your targets have a parent class, you can do a cast to that parent class. If your targeting a child of that parent, or the parent, the cast will succeed and you can continue with your lock on function.
I have this blueprint, based on the FPS template. I’ve added a path under the select, to get a rotation to an actor that’s being locked on to. However, if the player isn’t locked on, the lock target is null. I’m checking it with Is Valid, but I’m getting errors thrown anyway, probably because the Get Actor Location at bottom-center is being evaluated regardless of whether or not it will even be used, through the select. Am I doing something wrong here? Or is there some form of select that has an exec path, to avoid this?
I’m not sure what you mean. I want the same execution path whether or not the object is valid; I just want the engine to stop trying to access it when it’s not valid.
Ended up just working around it by using a value other than null. In this case, I just set it to self and checked for that condition.