Well, that’s exactly what the error message said, so I’m glad the compiler could help you
Second, UGameplayStatics::ApplyDamage()
is a shallow wrapper on top of AActor::TakeDamage()
, that formats the damage values you pass in as a damage event, and calls TakeDamage()
for you. If you already have the data in the necessary format, ApplyDamage()
isn’t useful. (Well, it also tests for NULL
pointers, but hopefully you don’t have a lot of those to damage )
(How did I find this out? Ctrl-Shift-F
across the engine source is very fast, and searching for ::ApplyDamage
found the instance, and the code is pretty easy to read.)