# Anyway to freeze the game for a second?

**URL:** https://forum.makecode.com/t/anyway-to-freeze-the-game-for-a-second/31316
**Category:** Help
**Tags:** game
**Created:** [October 23, 2024, 4:03pm UTC](https://forum.makecode.com/t/anyway-to-freeze-the-game-for-a-second/31316 "2024-10-23T16:03:19Z")
**Posts on this page:** 6
**Page:** 1

<div class="post-metadata">

### Author: ![Redsword](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.makecode.com/redsword/32/12843_2.png) [@Redsword](https://forum.makecode.com/u/Redsword)
#### Post date: [October 23, 2024, 4:03pm UTC](https://forum.makecode.com/t/anyway-to-freeze-the-game-for-a-second/31316/1 "2024-10-23T16:03:19Z")

</div>

Heyo, so I’m working on a flashy-ish fighter where you can punch an enemy while they’re attacking to parry them. Currently, that just plays a sound, shakes the screen and adds more knockback. I’d like to make the game completely pause for a second, freezing it for around a second to make it feel more impactful. If anyone knows how to do this, please let me know!

> **[No title but basically parry simulator](https://arcade.makecode.com/S42640-54138-64009-98713)**
>
> Made with ❤️ in Microsoft MakeCode Arcade.

---

<div class="post-metadata">

### Author: ![wispycrispy](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.makecode.com/wispycrispy/32/19222_2.png) [@wispycrispy](https://forum.makecode.com/u/wispycrispy)
#### Post date: [October 23, 2024, 9:44pm UTC](https://forum.makecode.com/t/anyway-to-freeze-the-game-for-a-second/31316/2 "2024-10-23T21:44:03Z")

</div>

These can be used to pause and unpause everything:

```auto
game.pushScene()
game.popScene()

```

I think you can switch to javascript and paste them onto an empty line then return to blocks to use them for block coding

---

<div class="post-metadata">

### Author: ![InvalidProject](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.makecode.com/invalidproject/32/32554_2.png) [@InvalidProject](https://forum.makecode.com/u/InvalidProject)
#### Post date: [October 23, 2024, 9:44pm UTC](https://forum.makecode.com/t/anyway-to-freeze-the-game-for-a-second/31316/3 "2024-10-23T21:44:42Z")

</div>

![Screenshot 2024-10-23 1.13.06 PM](https://us1.discourse-cdn.com/flex020/uploads/makecode/original/3X/4/6/46e1b085550cacf17e2dd90f499cbfb01b1a9832.png)y  
A good w to make the game freeze is using the tilemap! As shown, using the pause in a tilemap block will stop the entire game and gives an extra oomph! You can attempt to replicate the code below.

---

<div class="post-metadata">

### Author: ![WoofWoof](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.makecode.com/woofwoof/32/32523_2.png) [@WoofWoof](https://forum.makecode.com/u/WoofWoof)
#### Post date: [October 23, 2024, 9:45pm UTC](https://forum.makecode.com/t/anyway-to-freeze-the-game-for-a-second/31316/4 "2024-10-23T21:45:20Z")

</div>

If you put a Wait() inside a function, it pauses the whole game until the function ends.

---

<div class="post-metadata">

### Author: ![MYR](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.makecode.com/myr/32/16320_2.png) [@MYR](https://forum.makecode.com/u/MYR)
#### Post date: [October 24, 2024, 2:24am UTC](https://forum.makecode.com/t/anyway-to-freeze-the-game-for-a-second/31316/5 "2024-10-24T02:24:24Z")

</div>

That may be because of lag, because functions are supposed to run instantly, and it not running instantly may cause the game to freeze, because it is an unknown response.

---

<div class="post-metadata">

### Author: ![Redsword](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.makecode.com/redsword/32/12843_2.png) [@Redsword](https://forum.makecode.com/u/Redsword)
#### Post date: [October 24, 2024, 2:24am UTC](https://forum.makecode.com/t/anyway-to-freeze-the-game-for-a-second/31316/6 "2024-10-24T02:24:37Z")

</div>

This is perfect, thank you so much!
