# Events vs. Conditionals? Execution Errors

**URL:** <https://forum.makecode.com/t/events-vs-conditionals-execution-errors/13644>\
**Category:** Arcade\
**Created:** [May 18, 2022, 5:02pm UTC](https://forum.makecode.com/t/events-vs-conditionals-execution-errors/13644 "2022-05-18T17:02:41Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![cngsensei](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.makecode.com/cngsensei/32/10318_2.png) [@cngsensei](https://forum.makecode.com/u/cngsensei)\
**Post date:** [May 18, 2022, 5:02pm UTC](https://forum.makecode.com/t/events-vs-conditionals-execution-errors/13644/1 "2022-05-18T17:02:41Z")

</div>

If I execute the attached code, an A Button Pressed executes my jumpscare function correctly. If I try it with a collision detection, or timer event, it misbehaves. Anybody able to shed light on this?

[Jumpscare Template](https://makecode.com/_6sVE6377kihE)

---

<div class="post-metadata">

**Author:** ![AqeeAqee](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.makecode.com/aqeeaqee/32/5424_2.png) [@AqeeAqee](https://forum.makecode.com/u/AqeeAqee)\
**Post date:** [May 18, 2022, 11:48pm UTC](https://forum.makecode.com/t/events-vs-conditionals-execution-errors/13644/2 "2022-05-18T23:48:15Z")

</div>

Try this please.

> **[jumpscare jim template](https://arcade.makecode.com/93986-39272-13148-09019)**
>
> Made with ❤️ in Microsoft MakeCode Arcade.

---

<div class="post-metadata">

**Author:** ![AqeeAqee](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.makecode.com/aqeeaqee/32/5424_2.png) [@AqeeAqee](https://forum.makecode.com/u/AqeeAqee)\
**Post date:** [May 19, 2022, 6:33pm UTC](https://forum.makecode.com/t/events-vs-conditionals-execution-errors/13644/3 "2022-05-19T18:33:28Z")

</div>

The “on sprite of kind overlap tile” block is called by sprite.move(), the screen drawing will not be called until it complete(return). So whatever you do would not be seeing before next screen frame (refresh screen base on the data you updated).

Multi-times changing on one property will result in only the last value you set works.  
So marked status and quit ASAP, do your stuffs in a seperate thread, eg. in the forever() .

---

<div class="post-metadata">

**Author:** ![PrinceDaBezt123](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.makecode.com/princedabezt123/32/6280_2.png) [@PrinceDaBezt123](https://forum.makecode.com/u/PrinceDaBezt123)\
**Post date:** [May 19, 2022, 6:36pm UTC](https://forum.makecode.com/t/events-vs-conditionals-execution-errors/13644/4 "2022-05-19T18:36:06Z")

</div>

@cngsensei WOW!! This ACTUALLY scared me. I practically gasped aloud when I touched the rock and the monster appeared! Great job!
