Nature audio looping randomly

sushibyte

Veteran
Veteran
Joined
Oct 23, 2015
Messages
95
Reaction score
9
First Language
French
Say, I want to have a Crow , squeaking randomly. 

How would I use variable to do that?

I don't want to have it play at 4 seconds, then 10, then 15 and then repeat..because it wouldn't sound random. 

Any ideas?
 

Shaz

Veteran
Veteran
Joined
Mar 2, 2012
Messages
40,111
Reaction score
13,715
First Language
English
Primarily Uses
RMMV
There are several ways.

I'd do something like this in a parallel process event on the map:

Wait 30 framesControl Variables [001: Player Steps] = StepsConditional Branch: Variable [001: Player Steps] >= Variable [002: Target Steps] Control Variables [002: Target Steps] = Variable [001: Player Steps] Control Variables [002: Target Steps] += Random(30..50)Branch EndThen set up another parallel process that does this:
Code:
Control Variables [002: Target Steps] = StepsErase Event
So you have an event that's checking every half second whether or not it should play the SE. The trigger is whether they have taken a random number of steps between 30 and 50 since the last time the SE was played. Just change those numbers around depending on how long you want to wait between SEs, and how closely you want them to be spaced. The other event just ensures that the SE doesn't play immediately when you load the map, because at the start, target steps would be 0, and later on you could leave the map and accrue the required number of steps on another map so the condition will already be met when you come back here.You could also use Play Time instead of steps, so if the player pauses for a long time in the one place, the SE will continue to play every now and then.
 

Tagflag

Villager
Member
Joined
Nov 29, 2015
Messages
16
Reaction score
6
First Language
German
You can also use a plugin to make your life easier :p

I created a plugin for Random Number Generation and I added suupport to the wait command, If you combine both (very easy) then you get what you want.

I also created a topic for this plugin, but it needs to be approved by a moderator first, so I post the link here for you.

Plugin link:

http://www.mediafire.com/view/0jadyb3a3cp9v3t/TF_RandomNumberGenerator.js

Example link:

http://www.mediafire.com/download/xeci2qaiorqgetg/RandomNumberExample.rar

The example shows it in action + it's combination with wait. You can open the example in RPG Maker and view the event to see how to use. Everything is also explained in help section of the plugin.
 

sushibyte

Veteran
Veteran
Joined
Oct 23, 2015
Messages
95
Reaction score
9
First Language
French
a newbie question then, where do I put the SE ? I inserted a chicken SE right under wait 30 and now the chicken chirps non-stop
 
Last edited by a moderator:

Shaz

Veteran
Veteran
Joined
Mar 2, 2012
Messages
40,111
Reaction score
13,715
First Language
English
Primarily Uses
RMMV
Can you show a screenshot of the event, and one of the move route?
 

sushibyte

Veteran
Veteran
Joined
Oct 23, 2015
Messages
95
Reaction score
9
First Language
French
ok I have to say now..I was able to set something that looks similar to your idea but I obviously need a screenshot of what you are doing
 
Last edited by a moderator:

Shaz

Veteran
Veteran
Joined
Mar 2, 2012
Messages
40,111
Reaction score
13,715
First Language
English
Primarily Uses
RMMV
This is the alternative I spoke about, using play time rather than number of steps, so it will still work even if the player stands still for a long time. It plays the sound at 5-10 second intervals. Change the numbers in both events to whatever minimum/maximum you want. Play Time comes under the Game Data slot in Control Variables.





 
Last edited by a moderator:

Tagflag

Villager
Member
Joined
Nov 29, 2015
Messages
16
Reaction score
6
First Language
German
If you use my plugin, then it will look like this: (Note that it uses Variable #10, you can change that of course)

It's up to you, how you want to get it: by eventing alone or with help from a plugin (both ways are good)
 

sushibyte

Veteran
Veteran
Joined
Oct 23, 2015
Messages
95
Reaction score
9
First Language
French
thanks to both of you. Now this game of mine sounds alive.
 

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

Latest Threads

Latest Profile Posts

Don't forget, aspiring writers: Personality isn't what your characters do, it is WHY they do it.
Hello! I would like to know if there are any pluggings or any way to customize how battles look?
I was thinking that when you start the battle for it to appear the eyes of your characters and opponents sorta like Ace Attorney.
Sadly I don't know how that would be possible so I would be needing help! If you can help me in any way I would really apreciate it!
The biggest debate we need to complete on which is better, Waffles or Pancakes?
rux
How is it going? :D
Day 9 of giveaways! 8 prizes today :D

Forum statistics

Threads
106,050
Messages
1,018,548
Members
137,835
Latest member
yetisteven
Top