0 votes

Hey people, I need to play a sound when the game starts but it's played before (when the splash is being show in the screen and the game is loading yet).. So there are a way to know when the game is 100% loaded?

I could use a Timer, but the loading time is asynchronous and can variate depending the device is running my game.

in Engine by (655 points)

1 Answer

+1 vote
Best answer

Try this: Emit a signal when your loading process completes, and then start the sound when you receive the signal.

by (20,381 points)
selected by

But when to emit the signal? :\
I didn't find any function (that is called when the game is loaded) to emit any signal.

Have you tried this?

onready emit_signal('loaded')

This should emit a signal when the scene's ready (a.k.a. fully loaded.)

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.