# How to make the value decrease?

**URL:** https://forum.kirupa.com/t/how-to-make-the-value-decrease/283590
**Category:** flash
**Created:** [March 8, 2009, 9:26pm UTC](https://forum.kirupa.com/t/how-to-make-the-value-decrease/283590 "2009-03-08T21:26:51Z")
**Posts on this page:** 1
**Page:** 1

<div class="post-metadata">

### Author: ![farban](https://avatars.discourse-cdn.com/v4/letter/f/d07c76/32.png) [@farban](https://forum.kirupa.com/u/farban)
#### Post date: [March 8, 2009, 9:26pm UTC](https://forum.kirupa.com/t/how-to-make-the-value-decrease/283590/1 "2009-03-08T21:26:51Z")

</div>

Heya there just havig a stupid problem where the health on my game increases on my game instead of decreases when the player is hit.

here is the source code

HUD.as (Scoreboard)

```auto

 
        private var stageRef:Stage;
        public var s_score:Number = 0;
        public var s_kills:Number = 0;
        public var s_health:Number = 0;
 
        
 
           
            health.text = "100";
 
            
       
 
        public function updateHits(value:Number) : void
        {
            s_health += value;
            health.text = String(s_health);
        }
 
        
 
    }
 
}

```

engine.as (game engine)

```auto
private function shipHit(e:Event) : void
        {
            theHUD.updateHits(1); 
        }

```

thanks for any help
