# How to make the code wait but not pause?

**URL:** <https://forum.makecode.com/t/how-to-make-the-code-wait-but-not-pause/9525>\
**Category:** Help\
**Created:** [August 4, 2021, 4:28pm UTC](https://forum.makecode.com/t/how-to-make-the-code-wait-but-not-pause/9525 "2021-08-04T16:28:17Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![seatoad](https://avatars.discourse-cdn.com/v4/letter/s/3bc359/32.png) [@seatoad](https://forum.makecode.com/u/seatoad)\
**Post date:** [August 4, 2021, 4:28pm UTC](https://forum.makecode.com/t/how-to-make-the-code-wait-but-not-pause/9525/1 "2021-08-04T16:28:17Z")

</div>

Hi, this is a game I created: [https://makecode.com/\_3yFME59eAL01](https://makecode.com/_3yFME59eAL01)

As you can see, sometimes the monsters overlap each other, but I want it to wait a second before spawning in the next monster. I tried using the pause() function but I think that actually pauses the game? Is there a simple way to make it so it waits after spawning each monster to spawn the next? I want to do something like the “wait” block in scratch, but I am not sure how to do it.

---

<div class="post-metadata">

**Author:** ![Kiwiphoenix364](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.makecode.com/kiwiphoenix364/32/14368_2.png) [@Kiwiphoenix364](https://forum.makecode.com/u/Kiwiphoenix364)\
**Post date:** [August 4, 2021, 5:54pm UTC](https://forum.makecode.com/t/how-to-make-the-code-wait-but-not-pause/9525/2 "2021-08-04T17:54:32Z")

</div>

You can use the timers extension (scroll to bottom of blocks categories, click advanced, then scroll to the bottom of the advanced section, any you will see + Extensions. Click that and scroll to the timers extension and click on it.) The timers extension has a bunch of useful timing blocks, including “after \_\_\_\_ do” blocks. Also, welcome to the forums!

---

<div class="post-metadata">

**Author:** ![Sarge](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.makecode.com/sarge/32/19590_2.png) [@Sarge](https://forum.makecode.com/u/Sarge)\
**Post date:** [August 4, 2021, 5:54pm UTC](https://forum.makecode.com/t/how-to-make-the-code-wait-but-not-pause/9525/3 "2021-08-04T17:54:43Z")

</div>

You can use the timer extention which you can find at the bottom of the blocks list at the left of the screen.

**Step 1:** Just scroll to the bottom and you will see an “extentions” tab. Click it and you will get a menu open showing you all of the approved extentions.

**Step 2:** There just scroll and keep an eye out for a button that says “Timers” on it (it will be somewhere at the bottom of the page). When you click it the extention will auto-install.

**Step 3:** A new tab will appear on the right of the screen with the name “Timer”. Click it and there you will find a block that says “After 500 do”.

**Step 4:** Then simply drag it and attach it to an event block in the editor. There you can put whatever code you want to run after a certain amount of time that you can specify by clicking on the 500 marked in white on the block (the 500 represents the miliseconds)

Hope this helps!

---

<div class="post-metadata">

**Author:** ![seatoad](https://avatars.discourse-cdn.com/v4/letter/s/3bc359/32.png) [@seatoad](https://forum.makecode.com/u/seatoad)\
**Post date:** [August 4, 2021, 9:54pm UTC](https://forum.makecode.com/t/how-to-make-the-code-wait-but-not-pause/9525/4 "2021-08-04T21:54:23Z")

</div>

Thank you both, it works perfectly.

I don’t know if I have to mark this as solved, but it’s solved!

---

<div class="post-metadata">

**Author:** ![kingcobralasersnakes](https://avatars.discourse-cdn.com/v4/letter/k/6f9a4e/32.png) [@kingcobralasersnakes](https://forum.makecode.com/u/kingcobralasersnakes)\
**Post date:** [August 7, 2021, 11:22pm UTC](https://forum.makecode.com/t/how-to-make-the-code-wait-but-not-pause/9525/5 "2021-08-07T23:22:58Z")

</div>

u should make the skeletons shoot at u
