# Branch doesn't work; Blueprints

**URL:** <https://forums.unrealengine.com/t/branch-doesnt-work-blueprints/336285>\
**Category:** Blueprint\
**Tags:** condition, branch, unreal-engine, bug-report, Blueprint, question\
**Created:** [October 23, 2015, 10:46pm UTC](https://forums.unrealengine.com/t/branch-doesnt-work-blueprints/336285 "2015-10-23T22:46:26Z")\
**Posts on this page:** 16\
**Page:** 1

<div class="post-metadata">

**Author:** ![TechRay](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@TechRay](https://forums.unrealengine.com/u/TechRay)\
**Post date:** [October 23, 2015, 10:46pm UTC](https://forums.unrealengine.com/t/branch-doesnt-work-blueprints/336285/1 "2015-10-23T22:46:26Z")

</div>

Hello Guys, I’m very confused using the Blueprints.  
That you guys know what i want: The Player is walking through an component (weapon) and picks it up.  
As u see, the Blueprint logic goes through an Branch and it detects the current Boolean as False (default), so it does the whole PickUp-Thing, sets the Boolean to True and prints something. To this point everything works great. The Character picks up the weapon and prints the string. But if i now move the character over another weapon, it still picks it up, but it shouldn’t. The Branch should detect that the condition is now true, and it does (i once let it print something from the true part, and it worked). But after that it still performs the false section, although it shouldn’t…  
I hope you guys understood what i meant ^^ (I’m from germany and my english is quite terrible :/)

If i let the Blueprints show while playing, everything looks normal and it runs, as i want it to (just the Blueprints animating) but the game just performs as if the condition was FALSE, although it is showed as TRUE.

In my opinion, the Branch works in this case wrong… Or am i completely wrong with everything? ^^

It’s hard to explain though :X

Greetz ExR4y

 ![63857-branchproblem.png](https://d3kjluh73b9h9o.cloudfront.net/original/4X/c/4/1/c41eb0987788ac32da2eb21146c6b52c022a78a3.png)

---

<div class="post-metadata">

**Author:** ![Brohst](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Brohst](https://forums.unrealengine.com/u/Brohst)\
**Post date:** [October 23, 2015, 10:51pm UTC](https://forums.unrealengine.com/t/branch-doesnt-work-blueprints/336285/2 "2015-10-23T22:51:08Z")

</div>

S4me here!

---

<div class="post-metadata">

**Author:** ![Jacky](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/jacky/32/918690_2.png) [@Jacky](https://forums.unrealengine.com/u/Jacky)\
**Post date:** [October 23, 2015, 10:59pm UTC](https://forums.unrealengine.com/t/branch-doesnt-work-blueprints/336285/3 "2015-10-23T22:59:54Z")

</div>

In order to do what you want you should set/get that variable in your character BP so that every instance of that actor knows it’s value.

---

<div class="post-metadata">

**Author:** ![KITATUS](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/kitatus/32/983160_2.png) [@KITATUS](https://forums.unrealengine.com/u/KITATUS)\
**Post date:** [October 23, 2015, 11:04pm UTC](https://forums.unrealengine.com/t/branch-doesnt-work-blueprints/336285/4 "2015-10-23T23:04:18Z")

</div>

Like so:

 ![](https://d3kjluh73b9h9o.cloudfront.net/original/3X/f/4/f4640dbb72263d1a6913497bb48bd8643a27009d.png)

---

<div class="post-metadata">

**Author:** ![TechRay](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@TechRay](https://forums.unrealengine.com/u/TechRay)\
**Post date:** [October 23, 2015, 11:20pm UTC](https://forums.unrealengine.com/t/branch-doesnt-work-blueprints/336285/5 "2015-10-23T23:20:50Z")

</div>

Sorry, but how do i get the “Converter” between the “Cast to BP…” and the Branch?

---

<div class="post-metadata">

**Author:** ![Jacky](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/jacky/32/918690_2.png) [@Jacky](https://forums.unrealengine.com/u/Jacky)\
**Post date:** [October 23, 2015, 11:28pm UTC](https://forums.unrealengine.com/t/branch-doesnt-work-blueprints/336285/6 "2015-10-23T23:28:45Z")

</div>

Drag from the blue pin(As BP Player Pawn) and then type the name of your variable.

---

<div class="post-metadata">

**Author:** ![TechRay](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@TechRay](https://forums.unrealengine.com/u/TechRay)\
**Post date:** [October 24, 2015, 4:08pm UTC](https://forums.unrealengine.com/t/branch-doesnt-work-blueprints/336285/7 "2015-10-24T16:08:32Z")

</div>

I just checked again, and my blue “Cast to” looks quite different from yours… how did you get this?

---

<div class="post-metadata">

**Author:** ![Jacky](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/jacky/32/918690_2.png) [@Jacky](https://forums.unrealengine.com/u/Jacky)\
**Post date:** [October 24, 2015, 4:11pm UTC](https://forums.unrealengine.com/t/branch-doesnt-work-blueprints/336285/8 "2015-10-24T16:11:14Z")

</div>

Right click on the cast node and **Convert to Pure Cast**.

---

<div class="post-metadata">

**Author:** ![TechRay](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@TechRay](https://forums.unrealengine.com/u/TechRay)\
**Post date:** [October 24, 2015, 4:37pm UTC](https://forums.unrealengine.com/t/branch-doesnt-work-blueprints/336285/9 "2015-10-24T16:37:52Z")

</div>

Ok i got it, but i still cant get this node between the Cast to and the Condition… If i type in how my variable is called, it doesn’t find anything or (if i unselect this context sensitive) just the normal variable without this blue Target…

---

<div class="post-metadata">

**Author:** ![Jacky](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/jacky/32/918690_2.png) [@Jacky](https://forums.unrealengine.com/u/Jacky)\
**Post date:** [October 24, 2015, 4:45pm UTC](https://forums.unrealengine.com/t/branch-doesnt-work-blueprints/336285/10 "2015-10-24T16:45:12Z")

</div>

Can you post a screenshot please?

---

<div class="post-metadata">

**Author:** ![TechRay](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@TechRay](https://forums.unrealengine.com/u/TechRay)\
**Post date:** [October 24, 2015, 4:48pm UTC](https://forums.unrealengine.com/t/branch-doesnt-work-blueprints/336285/11 "2015-10-24T16:48:45Z")

</div>

![63952-fehlerfehler.png](https://d3kjluh73b9h9o.cloudfront.net/original/4X/e/e/6/ee681a22c871176595edc6d072e20dfb967c18ac.png)

the variable is called is attached…

![63953-fehler2.png](https://d3kjluh73b9h9o.cloudfront.net/original/4X/7/e/4/7e4468e32da1c1cedce44f3b6547f4e55e3c7978.png)

---

<div class="post-metadata">

**Author:** ![Jacky](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/jacky/32/918690_2.png) [@Jacky](https://forums.unrealengine.com/u/Jacky)\
**Post date:** [October 24, 2015, 4:52pm UTC](https://forums.unrealengine.com/t/branch-doesnt-work-blueprints/336285/12 "2015-10-24T16:52:01Z")

</div>

You are casting to wrong BP. You should cast to your character BP, not Anim.

---

<div class="post-metadata">

**Author:** ![TechRay](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@TechRay](https://forums.unrealengine.com/u/TechRay)\
**Post date:** [October 24, 2015, 4:57pm UTC](https://forums.unrealengine.com/t/branch-doesnt-work-blueprints/336285/13 "2015-10-24T16:57:05Z")

</div>

![63954-fehler3.png](https://d3kjluh73b9h9o.cloudfront.net/original/4X/e/7/e/e7eb223ac9d68869f5e14d0e32d41ff5b21cfde6.png)

But those are the only things we can choose, there is nothing for the character, right?

And sorry I ask so dumb ^^ I’m quite new to UE4 😃 And thanks for your help

---

<div class="post-metadata">

**Author:** ![Jacky](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/jacky/32/918690_2.png) [@Jacky](https://forums.unrealengine.com/u/Jacky)\
**Post date:** [October 24, 2015, 5:07pm UTC](https://forums.unrealengine.com/t/branch-doesnt-work-blueprints/336285/14 "2015-10-24T17:07:01Z")

</div>

Mixamo goblin’s character BP is called Mixamo\_Goblin i think, so search for _goblin_ instead of _bp_.

---

<div class="post-metadata">

**Author:** ![TechRay](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@TechRay](https://forums.unrealengine.com/u/TechRay)\
**Post date:** [October 24, 2015, 5:15pm UTC](https://forums.unrealengine.com/t/branch-doesnt-work-blueprints/336285/15 "2015-10-24T17:15:42Z")

</div>

![63957-fehler4.png](https://d3kjluh73b9h9o.cloudfront.net/original/4X/7/b/0/7b0688be94668efa6f1e4d87597f1c6e6d83be33.png)

Hm, it doesn’t find just Mixamo\_Goblin… And with this Master thing it doesn’t work…

---

<div class="post-metadata">

**Author:** ![Jacky](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/jacky/32/918690_2.png) [@Jacky](https://forums.unrealengine.com/u/Jacky)\
**Post date:** [October 26, 2015, 12:27am UTC](https://forums.unrealengine.com/t/branch-doesnt-work-blueprints/336285/16 "2015-10-26T00:27:30Z")

</div>

Well then go to content browser and find out where the character BP is for the goblin and what it is named. I thought you already knew that since you were already using that character when you posted the question and (assuming) you already created a bool variable in it.
