# Setting a Boolean in one Blueprint from another blueprint

**URL:** <https://forums.unrealengine.com/t/setting-a-boolean-in-one-blueprint-from-another-blueprint/289629>\
**Category:** UI\
**Tags:** interface, boolean, unreal-engine, Blueprint, question\
**Created:** [July 29, 2014, 10:08pm UTC](https://forums.unrealengine.com/t/setting-a-boolean-in-one-blueprint-from-another-blueprint/289629 "2014-07-29T22:08:40Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![Defendrio](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Defendrio](https://forums.unrealengine.com/u/Defendrio)\
**Post date:** [July 29, 2014, 10:08pm UTC](https://forums.unrealengine.com/t/setting-a-boolean-in-one-blueprint-from-another-blueprint/289629/1 "2014-07-29T22:08:40Z")

</div>

Hello,

I currently have a Pawn blueprint which contains a ‘Damage’ variable, I want to be able to set that variable whenever the Pawn collides with certain other blueprints. (Fire, Water, etc).

I’ve read a few tutorials to do with Blueprints and Interfaces but just can’t seem to get it to work.

Any ideas?

---

<div class="post-metadata">

**Author:** ![Erasio](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Erasio](https://forums.unrealengine.com/u/Erasio)\
**Post date:** [July 30, 2014, 12:09am UTC](https://forums.unrealengine.com/t/setting-a-boolean-in-one-blueprint-from-another-blueprint/289629/2 "2014-07-30T00:09:19Z")

</div>

You have two options you could use.

1. You could make that variable public and allow the modification of it from anywhere.
2. You could create a function which is doing that. (I would suggest this).

Now on the events “event on begin overlap” or “event hit” you get the actor which is colliding. Cast that one to your character pawn (Just go in the context menu and search for “cast to”) and then use the result of that to call that function or get/set that variable.

Will this get you started?

---

<div class="post-metadata">

**Author:** ![AttemptD](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@AttemptD](https://forums.unrealengine.com/u/AttemptD)\
**Post date:** [July 30, 2014, 1:29am UTC](https://forums.unrealengine.com/t/setting-a-boolean-in-one-blueprint-from-another-blueprint/289629/3 "2014-07-30T01:29:55Z")

</div>

Whether it be in the level blueprint or a class BP of the fire or water, just type get player character, drag a wire and type cast…cast to your player BP. Drag a wire from the blue output and type the bool variable in the player BP you want to turn on. Set it. Turn it on. Tada. 😉

---

<div class="post-metadata">

**Author:** ![Defendrio](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Defendrio](https://forums.unrealengine.com/u/Defendrio)\
**Post date:** [July 30, 2014, 6:46am UTC](https://forums.unrealengine.com/t/setting-a-boolean-in-one-blueprint-from-another-blueprint/289629/4 "2014-07-30T06:46:45Z")

</div>

Thanks! Works perfectly, I presumed it would be something complicated, I presumed wrong! 😛

---

<div class="post-metadata">

**Author:** ![JesseJustHim](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@JesseJustHim](https://forums.unrealengine.com/u/JesseJustHim)\
**Post date:** [November 9, 2021, 1:19am UTC](https://forums.unrealengine.com/t/setting-a-boolean-in-one-blueprint-from-another-blueprint/289629/5 "2021-11-09T01:19:37Z")

</div>

Works for me as well. Thanks

---

<div class="post-metadata">

**Author:** ![z2d3d](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/z2d3d/32/734976_2.png) [@z2d3d](https://forums.unrealengine.com/u/z2d3d)\
**Post date:** [October 8, 2024, 1:49pm UTC](https://forums.unrealengine.com/t/setting-a-boolean-in-one-blueprint-from-another-blueprint/289629/6 "2024-10-08T13:49:13Z")

</div>

OMG, how simple it was… I spend days to figure this out. Thank you
