Is there a way to stop you from moving your character in a game?

I’m working on a game, and I need the player to have his death animation without moving. Is there any way to disable key movements?

1 Like
  1. set a global variable that can be seen by everyone like “project.isAlive = true”
  2. for each control, say “if (project.isAlive === true) {
    // key control
    }”
  3. when the player dies, say “project.isAlive = false”
  4. when the player starts up again, you can set project.isAlive to be true.
2 Likes

Thank you for the help! I really appreciate it. :smiley:

1 Like