Sound with Fun
Moderator: Plugin Moderators
- KINGTUT10101
- 1,000,000 inhabitants
- Posts: 2226
- Joined: 07 Jul 2016, 22:50
- Location: 'Merica
- Plugins: Showcase Store
- Version: Beta
- Contact:
-
Plugin Creator
Platform
Sound with Fun
Would it be possible to make a building play a sound using fun?
- CommanderABab
- AB
- Posts: 11185
- Joined: 07 Jun 2016, 21:12
- Plugins: Showcase Store
- Version: Beta
-
Plugin Creator
Platform
Re: Sound with Fun
That might get out of hand very quickly!
- Lobby
- Developer
- Posts: 3713
- Joined: 26 Oct 2008, 12:34
- Plugins: Showcase Store
- Version: Beta
-
Platform
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
- Posts: 2728
- Joined: 24 Aug 2017, 11:17
- Location: Wandering around
- Plugins: Showcase Store
- Version: Beta
-
Plugin Creator
Platform
Re: Sound with Fun
So the music file will come with your files? You are just gonna choose a music file? Disregard this dumb question
Last edited by TheFennekin on 25 Mar 2022, 11:38, edited 2 times in total.
- KINGTUT10101
- 1,000,000 inhabitants
- Posts: 2226
- Joined: 07 Jul 2016, 22:50
- Location: 'Merica
- Plugins: Showcase Store
- Version: Beta
- Contact:
-
Plugin Creator
Platform
Re: Sound with Fun
Yes. I was inspired by redstone and noteblocks from Minecraft.
- KINGTUT10101
- 1,000,000 inhabitants
- Posts: 2226
- Joined: 07 Jul 2016, 22:50
- Location: 'Merica
- Plugins: Showcase Store
- Version: Beta
- Contact:
-
Plugin Creator
Platform
Re: Sound with Fun
Yes, but now we can do it with fun.
- KINGTUT10101
- 1,000,000 inhabitants
- Posts: 2226
- Joined: 07 Jul 2016, 22:50
- Location: 'Merica
- Plugins: Showcase Store
- Version: Beta
- Contact:
-
Plugin Creator
Platform
Re: Sound with Fun
I've noticed that the pitch of a sound changes with every use. Could this be fixed @Lobby
- KINGTUT10101
- 1,000,000 inhabitants
- Posts: 2226
- Joined: 07 Jul 2016, 22:50
- Location: 'Merica
- Plugins: Showcase Store
- Version: Beta
- Contact:
-
Plugin Creator
Platform
Re: Sound with Fun
There's also a crackling sound that occurs sometimes
- Lobby
- Developer
- Posts: 3713
- Joined: 26 Oct 2008, 12:34
- Plugins: Showcase Store
- Version: Beta
-
Platform
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.
- Lobby
- Developer
- Posts: 3713
- Joined: 26 Oct 2008, 12:34
- Plugins: Showcase Store
- Version: Beta
-
Platform
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
- Posts: 4314
- Joined: 14 Sep 2017, 17:30
- Location: Astrellia, UHAE
- Plugins: Showcase Store
- Version: Beta
-
Plugin Creator
Platform
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
- JustAnyone
- Developer
- Posts: 3534
- Joined: 23 Jul 2017, 12:45
- Location: Easter Island
- Plugins: Showcase Store
-
Platform
Re: Sound with Fun
Use Lua for that
- TheFennekin
- Neighborhood fox
- Posts: 2728
- Joined: 24 Aug 2017, 11:17
- Location: Wandering around
- Plugins: Showcase Store
- Version: Beta
-
Plugin Creator
Platform
Re: Sound with Fun
What is the max length of the sound can it play?