Sound?

#1

How do we use sound in defold on our new game?

0 Likes

#2

Did you read the sound manual?

1 Like

#3

Hey? Is there a way to download the sound script.

0 Likes

#4

We have created a sound component and we puzzled on why the sound won’t play.

0 Likes

#5

Are you a bot? If not please help us with finding the sound script.

0 Likes

#6

If you have a game object with a sound component with id “boom” and a script component you would play the sound like this:

sound.play("#boom")

What does your code look like? Do you have any errors in the console?

0 Likes

#7

Err, no. Although I think some other forum users may think so too from time to time.

9 Likes

#8

0 Likes

#9

We have no sound script so if you could do me a favor so i can keep my job, could you send me a sound script??

0 Likes

#10

Ok, and the code in game.script to play the sound?

0 Likes

#11

Could you do me a hugh favor?

0 Likes

#12

There’s no need for a separate sound script. If you wish to play that sound then somewhere in game.script when the sound should be played add this line:

sound.play("#sound")

0 Likes

#13

Oh ok much thx

0 Likes

#14

where should i put it?

0 Likes

#15

If you are worried about your job I would really recommend that you spend the necessary time needed to understand the code and Defold. Not let someone else to do your job for you.

4 Likes

#16

I thankyou for helping this late at night

0 Likes

#17

How would I know? If you need to play the sound when the player jumps put it with the code that makes the player jump. If you need to play the sound when the user clicks a button put the code there.

0 Likes

#18

It’s morning. I’m on my way to the Defold office.

0 Likes

#19

Ok thx

0 Likes

#20

My bad different location i’m the only worker at the office

2 Likes