# How to turn a variable true? 

**URL:** <https://forums.unrealengine.com/t/how-to-turn-a-variable-true/2739861>\
**Category:** Programming & Scripting\
**Tags:** Variable, beginner, unreal-engine, Blueprint, question\
**Created:** [July 31, 2026, 8:52pm UTC](https://forums.unrealengine.com/t/how-to-turn-a-variable-true/2739861 "2026-07-31T20:52:48Z")\
**Posts on this page:** 11\
**Page:** 1

<div class="post-metadata">

**Author:** ![Zander\_Lawrence](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Zander\_Lawrence](https://forums.unrealengine.com/u/Zander_Lawrence)\
**Post date:** [July 31, 2026, 8:52pm UTC](https://forums.unrealengine.com/t/how-to-turn-a-variable-true/2739861/1 "2026-07-31T20:52:48Z")

</div>

I have a character called BP\_FirstPersonCharacter (with a boolean variable called V\_Movement) and a Collision Sphere called Movement\_Blueprint, both have collisions and when they overlap, it should turn V\_Movement true, but it doesn´t work. So, what should I do to turn this annoying variable true?

---

<div class="post-metadata">

**Author:** ![illspiritx](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@illspiritx](https://forums.unrealengine.com/u/illspiritx)\
**Post date:** [August 1, 2026, 5:02am UTC](https://forums.unrealengine.com/t/how-to-turn-a-variable-true/2739861/2 "2026-08-01T05:02:12Z")

</div>

Show a pic of the on begin overlap event which should be triggering it.

---

<div class="post-metadata">

**Author:** ![Zander\_Lawrence](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Zander\_Lawrence](https://forums.unrealengine.com/u/Zander_Lawrence)\
**Post date:** [August 3, 2026, 6:00pm UTC](https://forums.unrealengine.com/t/how-to-turn-a-variable-true/2739861/3 "2026-08-03T18:00:36Z")

</div>

![Blueprint](https://d3kjluh73b9h9o.cloudfront.net/original/4X/4/2/f/42f2de94d03680c90fdb7949a89ddd17c2f09693.png)

Here´s the pic. Sorry for the delay.

---

<div class="post-metadata">

**Author:** ![menacing0ne](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@menacing0ne](https://forums.unrealengine.com/u/menacing0ne)\
**Post date:** [August 3, 2026, 10:59pm UTC](https://forums.unrealengine.com/t/how-to-turn-a-variable-true/2739861/4 "2026-08-03T22:59:06Z")

</div>

Are you sure that the Cast is not failing?

---

<div class="post-metadata">

**Author:** ![illspiritx](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@illspiritx](https://forums.unrealengine.com/u/illspiritx)\
**Post date:** [August 4, 2026, 2:27am UTC](https://forums.unrealengine.com/t/how-to-turn-a-variable-true/2739861/5 "2026-08-04T02:27:13Z")

</div>

Make sure both character capsule and the collision in movement blueprint have Generate Overlap Events checked in collision panel. May also want to get class from other actor on overlap then branch from if returned class == movement\_blueprint instead of casting. Or better yet put a tag on the movement switcher and check if actor has tag, and set bool off result of that. Could get fancy later and use different tags for different movement modifiers.

---

<div class="post-metadata">

**Author:** ![wbd\_fred](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@wbd\_fred](https://forums.unrealengine.com/u/wbd_fred)\
**Post date:** [August 4, 2026, 1:27pm UTC](https://forums.unrealengine.com/t/how-to-turn-a-variable-true/2739861/6 "2026-08-04T13:27:55Z")

</div>

The simplest way to debug is print nodes. Put one each on cast succeeded and cast failed with a helpful message.

If you never see a message, it means this event is not being executed at all; if you do, you’ll know which path.

It doesn’t replace setting breakpoints and other debugging techniques, but it’s a quick way to see what’s going on real time.

---

<div class="post-metadata">

**Author:** ![Zander\_Lawrence](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Zander\_Lawrence](https://forums.unrealengine.com/u/Zander_Lawrence)\
**Post date:** [August 4, 2026, 5:27pm UTC](https://forums.unrealengine.com/t/how-to-turn-a-variable-true/2739861/7 "2026-08-04T17:27:48Z")

</div>

I checked, and both had generate overlap on. I also did the print nodes, and it didn´t print the message for cast fail nor the other one. So I guess the event is not even being executed. But why not, if the character is touching the collision sphere and they should be overlapping?

---

<div class="post-metadata">

**Author:** ![pezzott1](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/pezzott1/32/1215068_2.png) [@pezzott1](https://forums.unrealengine.com/u/pezzott1)\
**Post date:** [August 4, 2026, 5:54pm UTC](https://forums.unrealengine.com/t/how-to-turn-a-variable-true/2739861/8 "2026-08-04T17:54:25Z")

</div>

> [@Zander\_Lawrence](#):
>
> But why not, if the character is touching the collision sphere and they should be overlapping?

Are they already overlapping when you hit play?

---

<div class="post-metadata">

**Author:** ![Zander\_Lawrence](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Zander\_Lawrence](https://forums.unrealengine.com/u/Zander_Lawrence)\
**Post date:** [August 4, 2026, 9:10pm UTC](https://forums.unrealengine.com/t/how-to-turn-a-variable-true/2739861/9 "2026-08-04T21:10:59Z")

</div>

Yes, is that the problem?

---

<div class="post-metadata">

**Author:** ![pezzott1](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/pezzott1/32/1215068_2.png) [@pezzott1](https://forums.unrealengine.com/u/pezzott1)\
**Post date:** [August 4, 2026, 9:29pm UTC](https://forums.unrealengine.com/t/how-to-turn-a-variable-true/2739861/10 "2026-08-04T21:29:05Z")

</div>

Yes, i believe that is your issue for the overlap not firing.

---

<div class="post-metadata">

**Author:** ![illspiritx](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@illspiritx](https://forums.unrealengine.com/u/illspiritx)\
**Post date:** [August 4, 2026, 11:05pm UTC](https://forums.unrealengine.com/t/how-to-turn-a-variable-true/2739861/11 "2026-08-04T23:05:11Z")

</div>

Aye, on begin overlap generally won’t fire when actors are already overlapping on begin play, since the overlap “began” on init before bp executes. To trigger an overlap on spawn, typically you need to do a small delay in on begin play (either delay until next tick, or just a 0.01s regular delay) then get overlappinhg actors. Or just set up the level in a way the player won’t spawn inside a trigger.
