Ok, I think I got it to work now. I just had to experiment a little bit to get the classes and syntax correct. And the “GetFName()” functions that you gave me worked out well. I ended up creating an array of type “USceneComponent” which I was able to then populate with the “GetChildrenComponents()” function.
Here is part of my code that seems to work:
// Array that will be populated mainly by child skeletal mesh components via a GetChildrenComponents function
// Reference the main skeletal mesh component on the NPC
USkeletalMeshComponent * SkeletalMeshComp1 = EnemiesInSphereRadius[ActorIndex]->FindComponentByClass<USkeletalMeshComponent>();
// Populate the "SkeletalMeshComponentArray2" array with all of the child skeletal meshes under the main one
for (int32 ActorIndex2 = 0; ActorIndex2 < SkeletalMeshComponentArray2.Num(); ++ActorIndex2)
// If the currently iterated scene component has the name "SK_Chest" then use that to get it's location.
if (SkeletalMeshComponentArray2[ActorIndex2]->GetFName() == FName("SK_Chest"))
ChestLocationOfEnemy = SkeletalMeshComponentArray2[ActorIndex2]->GetComponentLocation();
For now, it seems to be working, I have to test it some more, but I’m pretty sure it is getting the skeletal mesh chest location now. Thanks for your help!