# HP problem

**URL:** <https://forum.kirupa.com/t/hp-problem/245473>\
**Category:** programming\
**Created:** [November 30, 2007, 1:38am UTC](https://forum.kirupa.com/t/hp-problem/245473 "2007-11-30T01:38:28Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![marvolo\_cullen](https://avatars.discourse-cdn.com/v4/letter/m/7ba0ec/32.png) [@marvolo\_cullen](https://forum.kirupa.com/u/marvolo_cullen)\
**Post date:** [November 30, 2007, 1:38am UTC](https://forum.kirupa.com/t/hp-problem/245473/1 "2007-11-30T01:38:28Z")

</div>

im having a problem killing my character…lol… So i have my variable hp…  
and my if statement is if

```php
if(_root.hp<= 0) {
_root.gotoAndPlay(7); // my "you died" screen
}

```

i just put that on the timeline(didnt work:sad:)…i tried implementing that into a movieclip(didnt work:sad:), made it into a function that i put into every bad guy to run it upon contact with the bad guy(didnt work:sad:)… :crying:is there a problem with my comparison?
