0 votes

I am working on the dialog system for my game. I want the players and enemies/NPC to stop movement when in dialog mode. Currently thinking taking a pause to the game when playing dialog, but want to get some advise if there is other better way to achieve that. Thank you.

in Engine by (156 points)

1 Answer

0 votes
Best answer

that strongly depends on your program flow.
If you want to completly halt gametime, using pause seems to be a pretty good approach.

If animations and other npcs should continue to move and act you need a different approach,
When you want to restrict processing only on certain game elements you can ether branch your tree and set the pause mode corespondingly,
Or you can implement a master object wich calls all the objects to update and stop those objects by not calling them to update.
Or make a singleton and set a pause flag and whenever a object wants to update it first checks this flag.

... sure there are many more ways to archive this ....

by (2,424 points)
selected by

Thank you for your suggestions, I will first try the pause approach.

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.