# How to stop a function while colliding with the character

**URL:** <https://forums.unrealengine.com/t/how-to-stop-a-function-while-colliding-with-the-character/409198>\
**Category:** World Creation\
**Tags:** pause-game, actor-blueprint, unreal-engine, Collision, question, Blueprint\
**Created:** [November 9, 2017, 8:00pm UTC](https://forums.unrealengine.com/t/how-to-stop-a-function-while-colliding-with-the-character/409198 "2017-11-09T20:00:42Z")\
**Posts on this page:** 12\
**Page:** 1

<div class="post-metadata">

**Author:** ![worgus](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@worgus](https://forums.unrealengine.com/u/worgus)\
**Post date:** [November 9, 2017, 8:00pm UTC](https://forums.unrealengine.com/t/how-to-stop-a-function-while-colliding-with-the-character/409198/1 "2017-11-09T20:00:42Z")

</div>

Hi guys, I’m trying to stop a function that I put in the blueprint of the platform actor, the function causes them to move to a certain place infinitely. I wanted that when the character collided with these platforms they would stop right where they are. Thank you for any help.

 ![219667-demonstracao.jpg](https://d3kjluh73b9h9o.cloudfront.net/original/4X/0/c/c/0cca7a4aeab85a2b37da2629103bb068b2da54f0.jpeg)

blueprint actor Plataform:

 ![219668-demonstracaobluactor.png](https://d3kjluh73b9h9o.cloudfront.net/original/4X/0/8/e/08e1a2d6e337ece725729c3dfa877d6aab68f48f.png)

---

<div class="post-metadata">

**Author:** ![Melaverde](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Melaverde](https://forums.unrealengine.com/u/Melaverde)\
**Post date:** [November 9, 2017, 8:28pm UTC](https://forums.unrealengine.com/t/how-to-stop-a-function-while-colliding-with-the-character/409198/2 "2017-11-09T20:28:03Z")

</div>

You want stop event tick when there is overlap?

---

<div class="post-metadata">

**Author:** ![Anonymous\_e5d5c0bf7d300728867097ff79906dbe](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Anonymous\_e5d5c0bf7d300728867097ff79906dbe](https://forums.unrealengine.com/u/Anonymous_e5d5c0bf7d300728867097ff79906dbe)\
**Post date:** [November 9, 2017, 8:36pm UTC](https://forums.unrealengine.com/t/how-to-stop-a-function-while-colliding-with-the-character/409198/3 "2017-11-09T20:36:17Z")

</div>

There are various options to do so:  
As suggested above you can stop the tick function SetActorTickEnabled false,  
if you still need a tick function for other sort of things you can add a boolean variable - and perform your function while the var is true - on begin overlap you can set it to false and on end overlap you can return it back to true.

---

<div class="post-metadata">

**Author:** ![worgus](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@worgus](https://forums.unrealengine.com/u/worgus)\
**Post date:** [November 10, 2017, 11:40am UTC](https://forums.unrealengine.com/t/how-to-stop-a-function-while-colliding-with-the-character/409198/4 "2017-11-10T11:40:31Z")

</div>

yes! I Want it

---

<div class="post-metadata">

**Author:** ![worgus](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@worgus](https://forums.unrealengine.com/u/worgus)\
**Post date:** [November 10, 2017, 11:57am UTC](https://forums.unrealengine.com/t/how-to-stop-a-function-while-colliding-with-the-character/409198/5 "2017-11-10T11:57:15Z")

</div>

I Try use a boolean with a branch and the events begin overlap and end overlap but something im doing is wrong… look…

 ![219737-i-try.png](https://d3kjluh73b9h9o.cloudfront.net/original/4X/1/3/5/13517de72df8518262f6523d5750e738d56b8d97.png)

Can it be any problem in my actor’s collision?

 ![219738-i-try2.jpg](https://d3kjluh73b9h9o.cloudfront.net/original/4X/5/0/6/50668e69c0ab419fa5bacecdb0c645fb8e85c5ed.jpeg)

I’ll keep to trying  
Thank you very much!

---

<div class="post-metadata">

**Author:** ![Anonymous\_e5d5c0bf7d300728867097ff79906dbe](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Anonymous\_e5d5c0bf7d300728867097ff79906dbe](https://forums.unrealengine.com/u/Anonymous_e5d5c0bf7d300728867097ff79906dbe)\
**Post date:** [November 10, 2017, 5:21pm UTC](https://forums.unrealengine.com/t/how-to-stop-a-function-while-colliding-with-the-character/409198/6 "2017-11-10T17:21:38Z")

</div>

What exactly is wrong?  
I mean the bp looks fine

---

<div class="post-metadata">

**Author:** ![worgus](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@worgus](https://forums.unrealengine.com/u/worgus)\
**Post date:** [November 10, 2017, 5:44pm UTC](https://forums.unrealengine.com/t/how-to-stop-a-function-while-colliding-with-the-character/409198/7 "2017-11-10T17:44:28Z")

</div>

This is working but only with other actors, with the character it continues the function… I Was thinking… would it be better if I animatedly move the platforms and then put a function to stop when colliding?  
My goal is to make the platform stop moving as soon as the character falls on it

---

<div class="post-metadata">

**Author:** ![Anonymous\_e5d5c0bf7d300728867097ff79906dbe](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Anonymous\_e5d5c0bf7d300728867097ff79906dbe](https://forums.unrealengine.com/u/Anonymous_e5d5c0bf7d300728867097ff79906dbe)\
**Post date:** [November 10, 2017, 5:56pm UTC](https://forums.unrealengine.com/t/how-to-stop-a-function-while-colliding-with-the-character/409198/8 "2017-11-10T17:56:37Z")

</div>

Oh, so the character (pawn I suppose) does not generate the overlap event with the platform.  
Try to play with the collision preset of the platform/pawn.

---

<div class="post-metadata">

**Author:** ![Anonymous\_e5d5c0bf7d300728867097ff79906dbe](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Anonymous\_e5d5c0bf7d300728867097ff79906dbe](https://forums.unrealengine.com/u/Anonymous_e5d5c0bf7d300728867097ff79906dbe)\
**Post date:** [November 10, 2017, 5:58pm UTC](https://forums.unrealengine.com/t/how-to-stop-a-function-while-colliding-with-the-character/409198/9 "2017-11-10T17:58:05Z")

</div>

If you want to stop the movement forever you can override the hit event (collision) and disable the tick function/set the bool.

---

<div class="post-metadata">

**Author:** ![worgus](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@worgus](https://forums.unrealengine.com/u/worgus)\
**Post date:** [November 13, 2017, 12:41am UTC](https://forums.unrealengine.com/t/how-to-stop-a-function-while-colliding-with-the-character/409198/10 "2017-11-13T00:41:52Z")

</div>

Hey… I Got It!!! xD  
So … I was calling the collision event from the wrong object, I should have selected the triggerbox and then generated the onActorBeginOverlap command  
anyway thank you very much for the help

---

<div class="post-metadata">

**Author:** ![Anonymous\_e5d5c0bf7d300728867097ff79906dbe](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Anonymous\_e5d5c0bf7d300728867097ff79906dbe](https://forums.unrealengine.com/u/Anonymous_e5d5c0bf7d300728867097ff79906dbe)\
**Post date:** [November 13, 2017, 1:10am UTC](https://forums.unrealengine.com/t/how-to-stop-a-function-while-colliding-with-the-character/409198/11 "2017-11-13T01:10:19Z")

</div>

I glad you did it sir!

Good Luck!

---

<div class="post-metadata">

**Author:** ![worgus](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@worgus](https://forums.unrealengine.com/u/worgus)\
**Post date:** [November 13, 2017, 1:11am UTC](https://forums.unrealengine.com/t/how-to-stop-a-function-while-colliding-with-the-character/409198/12 "2017-11-13T01:11:55Z")

</div>

xD Thank you
