0 votes

Hi Community,

I have a game with fighting scenes in it. When the player hits an enemy with his sword (or is getting hit), I want to basically pause the game for just a 10th of a second or so, to give the impression of "whoah something just happened".

How would you guys do that? Using pause? Or do you have any suggestions?

Thx in advance!

in Engine by (64 points)

You could use the engine's pause feature, but honestly it seems like a quick fix that might cause some issues down the line. It may be better to implement some form of custom pause.

I needed to pause my player's activity during certain times, without resorting to the engine pause. What I did was create a disable() which disabled their collision, and stopped move_and_collide() from firing and reset the player's inputs on frames that the player_active state was false. If there were any functions that fired in response to signals, I also had them check the player's state before running.

That's only for one node though, it'd probably be more complicated to stop everything, but hopefully that description helps.

Please log in or register to answer this question.

Welcome to Godot Engine Q&A, where you can ask questions and receive answers from other members of the community.

Please make sure to read How to use this Q&A? before posting your first questions.
Social login is currently unavailable. If you've previously logged in with a Facebook or GitHub account, use the I forgot my password link in the login box to set a password for your account. If you still can't access your account, send an email to webmaster@godotengine.org with your username.