Periodic timer for sound effect

givecake

Villager
Member
Joined
Jun 13, 2014
Messages
28
Reaction score
1
First Language
English
Primarily Uses
Hi all,

Wondering how people might do this with events or scripting? The flow seems simple enough, make a random roll, 1-4 then wait this long. After which, play sound effect, and loop again. This should be able to produce a fairly good background ambience for a dog barking in the distance. I wonder if scripts could even change the volume and pitch? Hmm..

Any help would be nice,

Thanks,

GC
 

GrandmaDeb

Modern Exteriors Posted!
Veteran
Joined
Apr 25, 2012
Messages
4,467
Reaction score
2,942
Primarily Uses
Well, I wouldn't use scripts to make the changes in volume or pitch, when you can edit the sounds in the game.

Seems to me you could have a random number generate from 1-4.

Have four options for the wait command,

Generate again.

Have four options for which SE you would play (some played back at different edited levels in-game-editor.)

Run that puppy as a parallel process, and off you go.

What I don't know is how this would run with BGM (background music) playing.
 
Last edited by a moderator:

givecake

Villager
Member
Joined
Jun 13, 2014
Messages
28
Reaction score
1
First Language
English
Primarily Uses
Well, I wouldn't use scripts to make the changes in volume or pitch, when you can edit the sounds in the game.

Seems to me you could have a random number generate from 1-4.

Have four options for the wait command,

Generate again.

Have four options for which SE you would play (some played back at different edited levels in-game-editor.)

Run that puppy as a parallel process, and off you go.
Thanks Granma ;) Can you make good soup?
 

GrandmaDeb

Modern Exteriors Posted!
Veteran
Joined
Apr 25, 2012
Messages
4,467
Reaction score
2,942
Primarily Uses
I love to make soup. My favs are my own take on minestone, and cream of potato soup (with cheese!)

But I love all kinds of soup. I have a good hot -n- sour soup recipe, and I make a good turkey soup.

But here are your images. (I got interested.)

You will have to play with the volume a bit.

 

givecake

Villager
Member
Joined
Jun 13, 2014
Messages
28
Reaction score
1
First Language
English
Primarily Uses
I love to make soup. My favs are my own take on minestone, and cream of potato soup (with cheese!)

But I love all kinds of soup. I have a good hot -n- sour soup recipe, and I make a good turkey soup.

But here are your images. (I got interested.)

You will have to play with the volume a bit.

Oh NICE. Those soups all sound great. I also like Broccoli and Stilton soup. Thick, smooth and creamy! 

Thanks for the images, I had guessed the process would turn out a little long winded. I wonder if a short script would make that a bit easier. 
 

GrandmaDeb

Modern Exteriors Posted!
Veteran
Joined
Apr 25, 2012
Messages
4,467
Reaction score
2,942
Primarily Uses
Well, (I think!) you can use an event script call for the wait and save quite a few lines.
 
IDK the correct syntax, so you will need to check on this, but I think you can use
 
Wait($game_variables[1]*120)
 
To avoid the first conditional branch entirely.
(of course the [1] will have to be whatever variable you use.)
 
Last edited by a moderator:

Users Who Are Viewing This Thread (Users: 0, Guests: 1)

Latest Threads

Latest Profile Posts

Couple hours of work. Might use in my game as a secret find or something. Not sure. Fancy though no? :D
Holy stink, where have I been? Well, I started my temporary job this week. So less time to spend on game design... :(
Cartoonier cloud cover that better fits the art style, as well as (slightly) improved blending/fading... fading clouds when there are larger patterns is still somewhat abrupt for some reason.
Do you Find Tilesetting or Looking for Tilesets/Plugins more fun? Personally I like making my tileset for my Game (Cretaceous Park TM) xD
How many parameters is 'too many'??

Forum statistics

Threads
105,858
Messages
1,017,023
Members
137,565
Latest member
Callmelogann
Top