I’m at my wit’s end, I have a weapon line trace that applies damage to destructible meshes, now I’m trying to figure out how to apply damage to characters. Here’s what I got:
ACharacter *person= Cast(hit.getactor());
If(person->Actorhastag (FName (“RegularDude”)
{
}
That’s it. What is the syntax for actually hitting the character/capsule component? Please help me. The sooner I get this taken care of the better
Yes, I have the code that checks if the line trace hits something that’s not null. The problem is I don’t know the syntax for applying damage to a character as intelesense doesn’t have a take damage function like I did when I checked to see if I hit a destructible mesh.
So all Actors have a TakeDamage() function. I’m not exactly sure what the problem is, you shouldn’t have any issue calling Person->TakeDamage(…) after you make sure “Person” represents who you wanted.