Sound with Fun
Moderator: Plugin Moderators
- KINGTUT10101
- 1,000,000 inhabitants
- Reactions:
- Posts: 2101
- Joined: Thu Jul 07, 2016 22:50
- Location: 'Merica
- Plugins: Show
- Version: Beta
- Contact:
Sound with Fun
Would it be possible to make a building play a sound using fun?
All of my plug-ins, maps and more:
https://sites.google.com/view/retrocity ... authuser=0
YouTube channel:
https://youtube.com/c/kingtut-101
https://sites.google.com/view/retrocity ... authuser=0
YouTube channel:
https://youtube.com/c/kingtut-101
- CommanderABab
- AB
- Reactions:
- Posts: 9100
- Joined: Tue Jun 07, 2016 21:12
- Plugins: Show
- Version: Beta
Re: Sound with Fun
Sure, will be added:
Code: Select all
[
{
"id":"$fun_soundtest_sound00",
"type":"sound", // Type sound
"file":"sound.mp3", // Sound file in same directory
"volume":1.0 // Default is 1.0
},
{
"id":"$fun_soundtest_usage00",
"type":"decoration",
...
"on click fun":[
{
"actions":[
{"type":"play","id":"$deco_soundtest_sound00"} // Play sound
]
}
]
}
]
=^._.^= ∫
- TheFennekin
- Neighborhood fox
- Reactions:
- Posts: 2212
- Joined: Thu Aug 24, 2017 11:17
- Location: Tokyo
- Plugins: Show
- Version: Beta
Re: Sound with Fun
So the music file will come with your files? You are just gonna choose a music file?
- KINGTUT10101
- 1,000,000 inhabitants
- Reactions:
- Posts: 2101
- Joined: Thu Jul 07, 2016 22:50
- Location: 'Merica
- Plugins: Show
- Version: Beta
- Contact:
Re: Sound with Fun
Yes. I was inspired by redstone and noteblocks from Minecraft.
All of my plug-ins, maps and more:
https://sites.google.com/view/retrocity ... authuser=0
YouTube channel:
https://youtube.com/c/kingtut-101
https://sites.google.com/view/retrocity ... authuser=0
YouTube channel:
https://youtube.com/c/kingtut-101
- KINGTUT10101
- 1,000,000 inhabitants
- Reactions:
- Posts: 2101
- Joined: Thu Jul 07, 2016 22:50
- Location: 'Merica
- Plugins: Show
- Version: Beta
- Contact:
Re: Sound with Fun
Yes, but now we can do it with fun.
All of my plug-ins, maps and more:
https://sites.google.com/view/retrocity ... authuser=0
YouTube channel:
https://youtube.com/c/kingtut-101
https://sites.google.com/view/retrocity ... authuser=0
YouTube channel:
https://youtube.com/c/kingtut-101
- KINGTUT10101
- 1,000,000 inhabitants
- Reactions:
- Posts: 2101
- Joined: Thu Jul 07, 2016 22:50
- Location: 'Merica
- Plugins: Show
- Version: Beta
- Contact:
Re: Sound with Fun
I've noticed that the pitch of a sound changes with every use. Could this be fixed @Lobby
All of my plug-ins, maps and more:
https://sites.google.com/view/retrocity ... authuser=0
YouTube channel:
https://youtube.com/c/kingtut-101
https://sites.google.com/view/retrocity ... authuser=0
YouTube channel:
https://youtube.com/c/kingtut-101
Re: Sound with Fun
Wow, you're good. I forgot about that... it's used to avoid that same samples sum up to a loud noise.
=^._.^= ∫
- KINGTUT10101
- 1,000,000 inhabitants
- Reactions:
- Posts: 2101
- Joined: Thu Jul 07, 2016 22:50
- Location: 'Merica
- Plugins: Show
- Version: Beta
- Contact:
Re: Sound with Fun
There's also a crackling sound that occurs sometimes
All of my plug-ins, maps and more:
https://sites.google.com/view/retrocity ... authuser=0
YouTube channel:
https://youtube.com/c/kingtut-101
https://sites.google.com/view/retrocity ... authuser=0
YouTube channel:
https://youtube.com/c/kingtut-101
Re: Sound with Fun
I think I have found a solution to the crackling sound issue.
But more importantly @ KINGTUT10101 I recently found out that it would be better to avoid ogg or wav files in your plugins completely since they may lead to playback issues dependent on how the manufacturer implemented it
(Yes, as a programmer you normally you use pre-written functions and don't write things like that on your own, especially for complicated stuff like sound)
My conclusion is that MP3 is the only "safe" solution. It should also have similar file size compared to ogg while wave is basically unusable from a file size perspective. In case you have to convert files I can recommend a free tool called Audacity (for PC).
You have to use MP3 in order to support iOS.
But more importantly @ KINGTUT10101 I recently found out that it would be better to avoid ogg or wav files in your plugins completely since they may lead to playback issues dependent on how the manufacturer implemented it

(Yes, as a programmer you normally you use pre-written functions and don't write things like that on your own, especially for complicated stuff like sound)
My conclusion is that MP3 is the only "safe" solution. It should also have similar file size compared to ogg while wave is basically unusable from a file size perspective. In case you have to convert files I can recommend a free tool called Audacity (for PC).
You have to use MP3 in order to support iOS.
=^._.^= ∫
Re: Sound with Fun

In order to support iOS you have to use MP3 since other music formats are not supported there.
Unsupported sound files will simply be ignored, so your plugins will still work, just without sound.
=^._.^= ∫
- THEMAX
- Inhabitant of a Universe
- Reactions:
- Posts: 4263
- Joined: Thu Sep 14, 2017 17:30
- Location: Astrellia, UHAE
- Plugins: Show
- Version: Beta
Re: Sound with Fun
Hey lobby, i wondered something.
Does the game support plugins which can have sounds effect just like roads (traffic sound), tree (chirping birds) when you are zooming ? Cause i thought about some commercial buildings for my plugin having that functionality to make cities feels more animated.
@Lobby
Does the game support plugins which can have sounds effect just like roads (traffic sound), tree (chirping birds) when you are zooming ? Cause i thought about some commercial buildings for my plugin having that functionality to make cities feels more animated.
@Lobby
Emperor of Atlantean federated empire

Founder state of Internationxal council
Leader of AEOY and steel pact

Founder state of Internationxal council
Leader of AEOY and steel pact
- JustAnyone
- Rip-off engineer
- Reactions:
- Posts: 3027
- Joined: Sun Jul 23, 2017 12:45
- Location: Easter Island
- Plugins: Show
Re: Sound with Fun
Use Lua for that