Why and where are we returning damage applied at?


hi all,
I know the function is a float function but why and where are we returning damage applied at? isn’t it obsolete since we dealt the damage to health? are we gonna use it later? and where does all the applied damages go ?
shouldnt we use a custom void function instead?

To whatever called the function. Note that you’re using the returned value of the parent function on the first line of the function.

You can’t otherwise you wouldn’t be overriding the function.

1 Like

Thanks for your reply.

yea i got confused because we didn’t use the returned value at the moment in course and i just couldn’t get the idea of it (the returned value) being just lost in void or when was it dumped out of memory. I was stuck thinking it just lingered on for some reason :slight_smile:

i figure it can be used on components and stuff so thanks :+1:

You could also get the damage taken when you call the function.

float Damage = Pawn->TakeDamage(...);

Can’t think of a situation where I would care about the actual damage taken, though :man_shrugging:

This topic was automatically closed 24 hours after the last reply. New replies are no longer allowed.

Privacy & Terms