# Check if strength increased, If it increased then increase Health by 20

**URL:** <https://forums.unrealengine.com/t/check-if-strength-increased-if-it-increased-then-increase-health-by-20/425585>\
**Category:** Blueprint\
**Tags:** logic, unreal-engine, UE4, Blueprint, question\
**Created:** [May 21, 2018, 7:04am UTC](https://forums.unrealengine.com/t/check-if-strength-increased-if-it-increased-then-increase-health-by-20/425585 "2018-05-21T07:04:32Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![TheSteelJC](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@TheSteelJC](https://forums.unrealengine.com/u/TheSteelJC)\
**Post date:** [May 21, 2018, 7:04am UTC](https://forums.unrealengine.com/t/check-if-strength-increased-if-it-increased-then-increase-health-by-20/425585/1 "2018-05-21T07:04:32Z")

</div>

I want to increase my **health by 20** whenever my character gets **1 strength** , or **10 mana** per **1 intelligence**.

Or how can I just check whether a value increased or decreased. If it increased do something, if it decreased do something.

A blueprint demonstration would be much appreciated. Thanks in Advance!

---

<div class="post-metadata">

**Author:** ![Silensir](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Silensir](https://forums.unrealengine.com/u/Silensir)\
**Post date:** [May 21, 2018, 7:40am UTC](https://forums.unrealengine.com/t/check-if-strength-increased-if-it-increased-then-increase-health-by-20/425585/2 "2018-05-21T07:40:35Z")

</div>

Can you make a screenshot of your blueprint? How does strength and intelligence increase, is it whenever something which triggers a strength or intelligence increase happens it is increased by 1 or do you increase it in smaller portions like 0.1 for example?

---

<div class="post-metadata">

**Author:** ![TheSteelJC](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@TheSteelJC](https://forums.unrealengine.com/u/TheSteelJC)\
**Post date:** [May 21, 2018, 8:10am UTC](https://forums.unrealengine.com/t/check-if-strength-increased-if-it-increased-then-increase-health-by-20/425585/3 "2018-05-21T08:10:28Z")

</div>

I don’t have the blueprint yet. I am still solving it by writing it in a paper.

Like in dota bro. When a hero leveled up It gains 2 strength, 1 agility, 2 intelligence. Each of these attributes provides the hero an increase on health, mana, and attack speed depending on the increased attribute. In this case I want my character to get 20 health when my character level up it gets 1 strength, and 1 intelligence yields 10 mana. What I want is give my character 20 health every time it gets 1 strength from leveling up.

---

<div class="post-metadata">

**Author:** ![Silensir](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Silensir](https://forums.unrealengine.com/u/Silensir)\
**Post date:** [May 21, 2018, 8:48am UTC](https://forums.unrealengine.com/t/check-if-strength-increased-if-it-increased-then-increase-health-by-20/425585/4 "2018-05-21T08:48:53Z")

</div>

I have never played dota :l, But I think I understand :). I hope this solves your problem, let me know If I got it wrong. The first one is for if you are only ever gonna change it by a value of 1. The second one is for if you think you might increase it by a different value some time. In this case you could change out the literal float for a variable if you like. You don’t have to use them both, pick whichever suits your system.

 ![241678-example-bp.png](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/d/5/2d576121d67e26b123e7d809b9779465b5be4427.png)

Hope this helped :3

---

<div class="post-metadata">

**Author:** ![TheSteelJC](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@TheSteelJC](https://forums.unrealengine.com/u/TheSteelJC)\
**Post date:** [May 21, 2018, 9:47am UTC](https://forums.unrealengine.com/t/check-if-strength-increased-if-it-increased-then-increase-health-by-20/425585/5 "2018-05-21T09:47:46Z")

</div>

Thanks man you just saved my time. +1

---

<div class="post-metadata">

**Author:** ![mightyenigma](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@mightyenigma](https://forums.unrealengine.com/u/mightyenigma)\
**Post date:** [May 21, 2018, 5:08pm UTC](https://forums.unrealengine.com/t/check-if-strength-increased-if-it-increased-then-increase-health-by-20/425585/6 "2018-05-21T17:08:36Z")

</div>

I would recommend you make a struct or map for this, because leveling up in MOBAs is not on a linear scale, i.e. it doesn’t change by the same amount every level.
