# Emergency\_Paper2D, Destry Actor

**URL:** <https://forums.unrealengine.com/t/emergency-paper2d-destry-actor/1869221>\
**Category:** Programming & Scripting\
**Tags:** unreal-engine, Blueprint, question\
**Created:** [May 23, 2024, 1:52pm UTC](https://forums.unrealengine.com/t/emergency-paper2d-destry-actor/1869221 "2024-05-23T13:52:37Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![BigCambonz](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@BigCambonz](https://forums.unrealengine.com/u/BigCambonz)\
**Post date:** [May 23, 2024, 1:52pm UTC](https://forums.unrealengine.com/t/emergency-paper2d-destry-actor/1869221/1 "2024-05-23T13:52:37Z")

</div>

Hello everyone, i am currently working on a 2D platformer, but I encountered a problem. I created the HealtBar logic, but when my character has zero life, the Destroy Actor node doesn’t kick in, I don’t know why. Do you have any suggestions on this? Thanks in adavnce

---

<div class="post-metadata">

**Author:** ![BigCambonz](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@BigCambonz](https://forums.unrealengine.com/u/BigCambonz)\
**Post date:** [May 23, 2024, 1:52pm UTC](https://forums.unrealengine.com/t/emergency-paper2d-destry-actor/1869221/2 "2024-05-23T13:52:48Z")

</div>

![Immagine 2024-05-23](https://d3kjluh73b9h9o.cloudfront.net/original/4X/6/2/6/6269267ac26fd6d5cd664bf3cc3719e9889534bd.png)

---

<div class="post-metadata">

**Author:** ![pezzott1](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/pezzott1/32/1215068_2.png) [@pezzott1](https://forums.unrealengine.com/u/pezzott1)\
**Post date:** [May 23, 2024, 1:57pm UTC](https://forums.unrealengine.com/t/emergency-paper2d-destry-actor/1869221/3 "2024-05-23T13:57:35Z")

</div>

The condition should be: `CurrentHealth <= 0.0`. Place it in a Any Damage event so it checks every time damage is received.

* * *

See:

> [@Emergency, Healt and Damage](https://forums.unrealengine.com/t/emergency-healt-and-damage/1869137/9):
>
> it’s not safe to rely on == with floats. Try: [image] Ideally, also check it it’s below zero. I am a bit confused by the script, though. You seem to keep health in a character but attempt to destroy the BP you’re showing. also, you’re casting the Controller to Pawn (?), which makes no sense and will never work - the cast probably fails - could you double check? if this script is already in the Actor we want to destroy once its health goes below the threshold, there’s no need to cast…
