Hi, I’m making a multiplayer game, but how can I apply a damage when the player was shot?
Hey -
You could use the Apply Damage node with the damaged actor being the target getting hit and the damage causer as the weapon projectile.
How do I apply this to a hitscan weapon instead of a projectile weapon?
Hi ,
The apply damage node can get it’s damaged actor from the break hit result under a trace for hitscans. Then the damage causer is the weapon or the player.
I did this:
Event InputActionFire:
http://puu.sh/buYGM/e45cbadbaf.png
Event Any Damage:
http://puu.sh/buYJK/d6af9c44bd.png
But it doesn’t work (when shoot the player, it doesn’t decrease the Health).
Hi ,
Did you use a cast to node to the hit actor? If so you should be able to directly affect the health variable.
What do you mean? If I link the Hit Actor to the Cast node, I can’t set any variable.
I suppose that the Apply damage function is bugged, because if I do this, it doesn’t decrease health.
The problem was that the Apply damage function works only on server, and the input functions haven’t got Authority.