# In-game life only reduces by 30 even though set value is lower that 30

**URL:** <https://forum.makecode.com/t/in-game-life-only-reduces-by-30-even-though-set-value-is-lower-that-30/45109>\
**Category:** Help\
**Created:** [July 28, 2026, 2:05am UTC](https://forum.makecode.com/t/in-game-life-only-reduces-by-30-even-though-set-value-is-lower-that-30/45109 "2026-07-28T02:05:39Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![teoh-tech72931](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.makecode.com/teoh-tech72931/32/33817_2.png) [@teoh-tech72931](https://forum.makecode.com/u/teoh-tech72931)\
**Post date:** [July 28, 2026, 2:05am UTC](https://forum.makecode.com/t/in-game-life-only-reduces-by-30-even-though-set-value-is-lower-that-30/45109/1 "2026-07-28T02:05:39Z")

</div>

The code like this  
 ![image](https://us1.discourse-cdn.com/flex020/uploads/makecode/optimized/3X/b/1/b187e6f63b2cc0e8e77b233c15364bdef37193a1_2_690x52.png)  
No idea why it defaults to -30

---

<div class="post-metadata">

**Author:** ![AlexK](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.makecode.com/alexk/32/33339_2.png) [@AlexK](https://forum.makecode.com/u/AlexK)\
**Post date:** [July 28, 2026, 2:07am UTC](https://forum.makecode.com/t/in-game-life-only-reduces-by-30-even-though-set-value-is-lower-that-30/45109/2 "2026-07-28T02:07:49Z")

</div>

Use the debugger to see the values of the different variables to verify your block is calculating how you’re expecting. Otherwise, post a link to your project, as there may be something else happening completely outside of this block.

---

<div class="post-metadata">

**Author:** ![VoxelMaster64](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.makecode.com/voxelmaster64/32/32075_2.png) [@VoxelMaster64](https://forum.makecode.com/u/VoxelMaster64)\
**Post date:** [July 28, 2026, 9:03pm UTC](https://forum.makecode.com/t/in-game-life-only-reduces-by-30-even-though-set-value-is-lower-that-30/45109/3 "2026-07-28T21:03:36Z")

</div>

It’s definitely something else going on, because if your absoluting the onput number and multiplying and dividing by positive numbers, then the output is always positive.

---

<div class="post-metadata">

**Author:** ![teoh-tech72931](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.makecode.com/teoh-tech72931/32/33817_2.png) [@teoh-tech72931](https://forum.makecode.com/u/teoh-tech72931)\
**Post date:** [July 30, 2026, 5:03pm UTC](https://forum.makecode.com/t/in-game-life-only-reduces-by-30-even-though-set-value-is-lower-that-30/45109/4 "2026-07-30T17:03:51Z")

</div>

ok  
found the problem

 ![Updated life setting system](https://us1.discourse-cdn.com/flex020/uploads/makecode/original/3X/f/4/f4f64bf7c40e99ad9b15a18edca57cac0fe683d5.png)  
there is a block that sets the mySprite2 velocity to 60vx and random vy  
 ![Note the set sprite velocity block](https://us1.discourse-cdn.com/flex020/uploads/makecode/original/3X/e/5/e50cff36e8fa30c6359fe3ef6a6f4f80fbd422b1.png)

😑
