Set Max Damage A Player Can Take, then DestroyActor
I can deal damage to a player using blueprints. But how do I make it so after some amount of damage the player will destroy using DestroyActor? How to get a damage variable from damage nodes and if it's a boolean or int destroyActor if that variable reaches true for some number or is >= int amount of damage?
asked Nov 05 '15 at 08:04 PM in Blueprint Scripting
Basically you need two variables in your player BP; one for to track the amount of damage received and another one to set the max. amount of damage the player can get. The first one(lets call it Damage Count) will be 0 by default, and you'll set and update it with Event Any Damage by adding the amount of damage received to itself. Then you compare the damage count with your damage limit variable, and if it's equal or greater than the limit destroy the actor. Something like this:
Ignore the DamageIndicatorColorChange node in the screenshot.
Follow this question
Once you sign in you will be able to subscribe for any updates here