Sound when tapping

Plug-in related stuff can be discussed here.

Moderator: Plugin Moderators

User avatar
Josh
Graphic designer
Reactions:
Posts: 2214
Joined: 11 Mar 2017, 19:20
Location: The Netherlands
Plugins: Showcase Store
Version: Beta

Plugin Creator

Platform

Sound when tapping

#1

Post by Josh »

Is there a way to code a json, when you tap a building a specific sound is heard?

User avatar
KINGTUT10101
1,000,000 inhabitants
Reactions:
Posts: 2220
Joined: 07 Jul 2016, 22:50
Location: 'Merica
Plugins: Showcase Store
Version: Beta
Contact:

Plugin Creator

Platform

#2

Post by KINGTUT10101 »

That would be a cool feature.

User avatar
Barky
TheoTown Cartographer
Reactions:
Posts: 2056
Joined: 17 Apr 2017, 22:13
Location: Ireland
Plugins: Showcase Store

Platform

#3

Post by Barky »

That would be handy

User avatar
Lobby
Developer
Reactions:
Posts: 3705
Joined: 26 Oct 2008, 12:34
Plugins: Showcase Store
Version: Beta

Platform

#4

Post by Lobby »

Might look like

Code: Select all

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

User avatar
Lobby
Developer
Reactions:
Posts: 3705
Joined: 26 Oct 2008, 12:34
Plugins: Showcase Store
Version: Beta

Platform

#5

Post by Lobby »

No idea, audio has not a high priority and it might lead to some major issues.

User avatar
CommanderABab
AB
Reactions:
Posts: 11107
Joined: 07 Jun 2016, 21:12
Plugins: Showcase Store
Version: Beta

Plugin Creator

Platform

#6

Post by CommanderABab »

Where sre the sound files stored? Do they stay in the file system?

User avatar
Lobby
Developer
Reactions:
Posts: 3705
Joined: 26 Oct 2008, 12:34
Plugins: Showcase Store
Version: Beta

Platform

#7

Post 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.

User avatar
CommanderABab
AB
Reactions:
Posts: 11107
Joined: 07 Jun 2016, 21:12
Plugins: Showcase Store
Version: Beta

Plugin Creator

Platform

#8

Post by CommanderABab »

No, I mean do you load the sound file into the game? Or, play it from the file?

User avatar
CommanderABab
AB
Reactions:
Posts: 11107
Joined: 07 Jun 2016, 21:12
Plugins: Showcase Store
Version: Beta

Plugin Creator

Platform

#9

Post by CommanderABab »

So, maybe the opera is coming too?

;)

User avatar
Lobby
Developer
Reactions:
Posts: 3705
Joined: 26 Oct 2008, 12:34
Plugins: Showcase Store
Version: Beta

Platform

#10

Post by Lobby »

Play it from the file :roll:

User avatar
CommanderABab
AB
Reactions:
Posts: 11107
Joined: 07 Jun 2016, 21:12
Plugins: Showcase Store
Version: Beta

Plugin Creator

Platform

#11

Post by CommanderABab »

Thanks! Sounds cool!

User avatar
Sythe Official
Settler
Reactions:
Posts: 1
Joined: 26 Jun 2023, 05:22

Plugin Creator

Platform

Re: Sound when tapping

#12

Post 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
Last edited by Sythe Official on 26 Jun 2023, 08:12, edited 1 time in total.

Post Reply Previous topicNext topic

Return to “Plug-In Discussion”