0
Answered

Press the ESC key to pause the game.

cloud cang 4 months ago in Game Creator updated by Marti (Lead Developer) 4 months ago 2

What should I do when I press the ESC key to pause the game? I did n’t find a way to pause the game by pressing the ESC key. My weapon needs to be adjusted, and I need help.

Unity version:
2019.3.8
Game Creator version:
1.1.8

Answer

+1
Answer
  1. Add a Trigger for input/key down/esc
  2. Add an Action to this Trigger
  3. Add to this Action General/Time Scale/ set value to Zero.

To unPause the game with the same key, you will need to add a Condition.

The easiest way to do this is:

  1. Add a Trigger for input/key down/esc that calls  Action/Toggle a Bool Variable. 
  2. Add another Trigger for onVariable Change calls a Condition.
  3. Then add a Condition to check the Bool something like if True Action/Time Scale 0, if False, Time Scale 1.

As for Adjusting your Weapon, https://docs.gamecreator.io/melee/melee/weapons/blade-component

GOOD, I'M SATISFIED

Thank you for your reply. The problem is solved.

Satisfaction mark by cloud cang 4 months ago
+1
Answer
  1. Add a Trigger for input/key down/esc
  2. Add an Action to this Trigger
  3. Add to this Action General/Time Scale/ set value to Zero.

To unPause the game with the same key, you will need to add a Condition.

The easiest way to do this is:

  1. Add a Trigger for input/key down/esc that calls  Action/Toggle a Bool Variable. 
  2. Add another Trigger for onVariable Change calls a Condition.
  3. Then add a Condition to check the Bool something like if True Action/Time Scale 0, if False, Time Scale 1.

As for Adjusting your Weapon, https://docs.gamecreator.io/melee/melee/weapons/blade-component