# do different equation depending on "\>= / branch" output?

**URL:** <https://forums.unrealengine.com/t/do-different-equation-depending-on-branch-output/441721>\
**Category:** Community & Industry Discussion\
**Tags:** math, branch, unreal-engine, question\
**Created:** [January 20, 2019, 9:38pm UTC](https://forums.unrealengine.com/t/do-different-equation-depending-on-branch-output/441721 "2019-01-20T21:38:49Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Washniac](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Washniac](https://forums.unrealengine.com/u/Washniac)\
**Post date:** [January 20, 2019, 9:38pm UTC](https://forums.unrealengine.com/t/do-different-equation-depending-on-branch-output/441721/1 "2019-01-20T21:38:49Z")

</div>

I’ve been looking everywhere and it’s either not possible or im blind as a bat (i know that bats aren’t really blind).  
So basically to make it simple let’s say i have a number A and now i’m checking if A is let’s say smaller than 30, if it is i want to for example subtract 10 from A so (A - 10) but if it’s not then i want to do something else with that number like (A \* (A - 10) ). Is there even a way to do such a simple thing with blueprints? Those equations are just random it doesnt matter what they do the point is, is there a way to do different math depending on the outcome of my “if” statement? Please be gentle with me i’m new here 🙂

---

<div class="post-metadata">

**Author:** ![Debaucher](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/debaucher/32/482342_2.png) [@Debaucher](https://forums.unrealengine.com/u/Debaucher)\
**Post date:** [January 20, 2019, 9:59pm UTC](https://forums.unrealengine.com/t/do-different-equation-depending-on-branch-output/441721/2 "2019-01-20T21:59:06Z")

</div>

This is the graph I made for you. Let me know if you have any questions.

 ![265991-help.png](https://d3kjluh73b9h9o.cloudfront.net/original/4X/c/0/d/c0db28451eb1973b80b0aa380d1013c7b9d3a917.png)

---

<div class="post-metadata">

**Author:** ![Washniac](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Washniac](https://forums.unrealengine.com/u/Washniac)\
**Post date:** [January 20, 2019, 10:28pm UTC](https://forums.unrealengine.com/t/do-different-equation-depending-on-branch-output/441721/3 "2019-01-20T22:28:39Z")

</div>

Works like a charm, thanks a lot. It just never came to my mind that i can use variables in blueprints too! Set them and read them later on 🙂 Thanks again

---

<div class="post-metadata">

**Author:** ![Nebula\_Games\_Inc](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Nebula\_Games\_Inc](https://forums.unrealengine.com/u/Nebula_Games_Inc)\
**Post date:** [January 20, 2019, 10:29pm UTC](https://forums.unrealengine.com/t/do-different-equation-depending-on-branch-output/441721/4 "2019-01-20T22:29:52Z")

</div>

As Debaucher showed, you just need to have different executions off the true and false branch node. Simple question, simple answer…welcome to UE4 🙂
