# \[Extension\] arcade-multi-events

**URL:** <https://forum.makecode.com/t/extension-arcade-multi-events/41949>\
**Category:** Show & Tell\
**Tags:** extension\
**Created:** [February 6, 2026, 11:34pm UTC](https://forum.makecode.com/t/extension-arcade-multi-events/41949 "2026-02-06T23:34:37Z")\
**Posts on this page:** 8\
**Page:** 2

<div class="post-metadata">

**Author:** ![not\_a\_lemon](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.makecode.com/not_a_lemon/32/35289_2.png) [@not\_a\_lemon](https://forum.makecode.com/u/not_a_lemon)\
**Post date:** [April 22, 2026, 7:15pm UTC](https://forum.makecode.com/t/extension-arcade-multi-events/41949/21 "2026-04-22T19:15:52Z")

</div>

There are multiple files; overlap code (scene.onOverlapTile(), sprites.onOverlap(), multiEvents.onOverlap(), etc.) doesn’t work. You can walk through spikes, enemies, enemies don’t get hurt, etc. but spriteEvents extension overlaps work fine. The files that the overlaps are in are Enemies.ts, Player.ts, Levels.ts. When I added the multi events extension the GitHub button in makecode was bugging out so I copy-pasted the file data from pxt.json and put it directly into GitHub; I don’t know if that caused an error? Essentially what happened is I manually added the multiEvents extension to pxt.json in GitHub, and sprite/tile overlaps stopped working.

---

<div class="post-metadata">

**Author:** ![richard](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.makecode.com/richard/32/5417_2.png) [@richard](https://forum.makecode.com/u/richard)\
**Post date:** [April 22, 2026, 9:10pm UTC](https://forum.makecode.com/t/extension-arcade-multi-events/41949/22 "2026-04-22T21:10:42Z")

</div>

this was a tough one to figure out! @jwunderl and I debugged it on livestream today: [https://www.youtube.com/watch?v=mL\_SpqfE91U](https://www.youtube.com/watch?v=mL_SpqfE91U)

the issue is the order of the files in your pxt.json

you need to move the `.g.ts` and `.g.jres` files to the top of the files array like this:

 ![image](https://us1.discourse-cdn.com/flex020/uploads/makecode/original/3X/1/f/1fa8386293988fb59389aa7e3f2ed44aefe18cf8.png)

---

<div class="post-metadata">

**Author:** ![not\_a\_lemon](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.makecode.com/not_a_lemon/32/35289_2.png) [@not\_a\_lemon](https://forum.makecode.com/u/not_a_lemon)\
**Post date:** [April 23, 2026, 6:20pm UTC](https://forum.makecode.com/t/extension-arcade-multi-events/41949/24 "2026-04-23T18:20:36Z")

</div>

This solution works to fix the tile overlaps, but sprites still don’t work… I’ve tested for overlaps in console AND logged the oil hitbox images; images return as {} but it still doesn’t detect sprite overlaps. The link is the same one as before.

---

<div class="post-metadata">

**Author:** ![Bifrosty](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.makecode.com/bifrosty/32/24819_2.png) [@Bifrosty](https://forum.makecode.com/u/Bifrosty)\
**Post date:** [April 27, 2026, 4:38pm UTC](https://forum.makecode.com/t/extension-arcade-multi-events/41949/25 "2026-04-27T16:38:29Z")

</div>

Would any content from this extension come to the base editor in the foreseeable future?

---

<div class="post-metadata">

**Author:** ![richard](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.makecode.com/richard/32/5417_2.png) [@richard](https://forum.makecode.com/u/richard)\
**Post date:** [April 27, 2026, 5:30pm UTC](https://forum.makecode.com/t/extension-arcade-multi-events/41949/26 "2026-04-27T17:30:56Z")

</div>

nope, will probably stay as an extension

---

<div class="post-metadata">

**Author:** ![richard](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.makecode.com/richard/32/5417_2.png) [@richard](https://forum.makecode.com/u/richard)\
**Post date:** [April 27, 2026, 5:48pm UTC](https://forum.makecode.com/t/extension-arcade-multi-events/41949/27 "2026-04-27T17:48:50Z")

</div>

once again, this is a problem with the order files are executing.

i recommend you create a new file called spritekinds.ts and put all of your spritekind definitions in that file. then put that file first in the files array in pxt.json

---

<div class="post-metadata">

**Author:** ![VoxelMaster64](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.makecode.com/voxelmaster64/32/32075_2.png) [@VoxelMaster64](https://forum.makecode.com/u/VoxelMaster64)\
**Post date:** [April 28, 2026, 9:11pm UTC](https://forum.makecode.com/t/extension-arcade-multi-events/41949/28 "2026-04-28T21:11:52Z")

</div>

wait you can do that. I literally always made init functions (bc of my time with c++ & SDL2) which worked fine. I have an init in my voxel engine and the extension for it. Hmm… is there a way to remove the init() function in my voxel extension, while having the variables exist at the right time? (should I edit pxt.json?)

---

<div class="post-metadata">

**Author:** ![richard](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.makecode.com/richard/32/5417_2.png) [@richard](https://forum.makecode.com/u/richard)\
**Post date:** [April 28, 2026, 9:38pm UTC](https://forum.makecode.com/t/extension-arcade-multi-events/41949/29 "2026-04-28T21:38:16Z")

</div>

the files array in pxt.json controls the execution order of the code, except main.ts is always moved to the bottom of the array regardless of where it actually is in the file. in other words, main.ts always runs last.

…that being said, relying on that execution order is a little hacky/fragile. having an init function is better practice!

[Previous page](https://forum.makecode.com/t/extension-arcade-multi-events/41949.md?page=1)
