Page 1 of 1

Sound when tapping

Posted: 10 Jun 2017, 23:26
by Josh
Is there a way to code a json, when you tap a building a specific sound is heard?

Posted: 10 Jun 2017, 23:56
by KINGTUT10101
That would be a cool feature.

Posted: 11 Jun 2017, 00:20
by Barky
That would be handy

Posted: 11 Jun 2017, 15:21
by Lobby
Might look like

Code: Select all

"sound click":{"file":"sound.ogg"}
and will support audio formats as listed here

Posted: 11 Jun 2017, 19:48
by Lobby
No idea, audio has not a high priority and it might lead to some major issues.

Posted: 11 Jun 2017, 20:11
by CommanderABab
Where sre the sound files stored? Do they stay in the file system?

Posted: 11 Jun 2017, 20:23
by Lobby
For plugins? You put them in the same folder as the json file (as with images). It will work with the next release.

Posted: 11 Jun 2017, 20:26
by CommanderABab
No, I mean do you load the sound file into the game? Or, play it from the file?

Posted: 11 Jun 2017, 20:27
by CommanderABab
So, maybe the opera is coming too?

;)

Posted: 11 Jun 2017, 20:31
by Lobby
Play it from the file :roll:

Posted: 11 Jun 2017, 20:40
by CommanderABab
Thanks! Sounds cool!

Re: Sound when tapping

Posted: 26 Jun 2023, 08:09
by Sythe Official
I have a question, does using an id of a sound works with the "sound click" attribute?? if it does how can I do it?? by putting the sound's id in the "id" attribute like what I did below or what??

Code: Select all    Reset

[ // Sample sound. { "id": "$soundClick00", "type": "sound", "file": "soundClick.mp3", "volume": 1.0 }, // Sample building. { "id": "$soundClickTest00", "type": "decoration", "title": "Sound Click Test", "text": "Sound Click Test", "sound click": { "id": "$soundClick00" } } ]
JSON checker
Check