It sounds a bit silly to me but I was trying to make a cow in afield that periodically moos and different pitches but the issue I've been having is that I wanted the event to have a short interval between playing the sound without using the wait command as that stops everything in the game meaning that my character can't move. Does anyone know how I could do this?
Delaying an Event Without Effecting The Rest of The Game
RPG Maker VXAce Supportwait works, but for your description, you seem to use a autorun?
or a action command with a wait (which stops the player from moving).
wait works, but the event itself should be put in "parallel" event.
in case you want to interact with it as well, you need to place this
parallel event in a seperate event to control the cow. and stops when
interact with it and continue when your done on it.
but it depends what you want to achieve exactly in detail and the event
you have currently so we can direct you to a better solution.
or a action command with a wait (which stops the player from moving).
wait works, but the event itself should be put in "parallel" event.
in case you want to interact with it as well, you need to place this
parallel event in a seperate event to control the cow. and stops when
interact with it and continue when your done on it.
but it depends what you want to achieve exactly in detail and the event
you have currently so we can direct you to a better solution.
Create a custom move route for it, or use a Parallel event. Neither of those will affect the flow of the rest of the game.
Moved to: VX Ace Support
How do you get it so the sounds don't loop a bunch per second though?
I'm also going to be doing something like this, I will have several different loon calls play randomly but I also need the player to be able to move.
I'm also going to be doing something like this, I will have several different loon calls play randomly but I also need the player to be able to move.
I want to say use parallel process page, but for safety reasons, do refrain from using that unless it's really necessary or you understand the risk.
If it's me, I will make use of a custom autonomous movement route:
It might looks like that it simply play sound effect every 30 frames delay.
But do note that I use a script call to play the audio.
Code:
AudioManager.playSe({name: 'Cursor1', pan: 0, pitch: 100, volume: [0,0,0,100][Math.randomInt(4)]})
In this case I use
[0,0,0,100][Math.randomInt(4)] for its volume.Mean it has 3/4 chance to make a silent sound (0% volume) and 1/4 chance to make sound (100% volume).
In overall, it's like for every 30 frames, it has 25% chance to make sound.
You can play around those argument whatever you need.
In case you need the autonomous movement for something else, or want to be more advanced, I would recommend to use an entire new empty event to control the sounds.
@Kuro DCupu Those script calls are for MV/MZ (Javascript), so won't work in Ace (Ruby)
@kingtom I personally avoid using parallel processes whenever I can, so in this case would recommend using a Set Route Move. For the event with your cow (or whatever) select Custom movement type. Then put everything in the Move route which is immediately underneath. To avoid the sound problem identified by @cthulhusquid I put in a 'Wait' command immediately after it for about the length of time the sound effect takes to play. However, in your case it is likely to be longer than that as you want a noticeable pause between each sound. Because the Wait command is in the custom route move, it does not have any effect on any other part of the game.
EDIT
Here is a snip shot showing what I am referring to. I have only given 2 SEs, but you could have any number in any sequence that you wanted. Always make sure the list ends with a Wait command, as the event will then loop back to the beginning.
@kingtom I personally avoid using parallel processes whenever I can, so in this case would recommend using a Set Route Move. For the event with your cow (or whatever) select Custom movement type. Then put everything in the Move route which is immediately underneath. To avoid the sound problem identified by @cthulhusquid I put in a 'Wait' command immediately after it for about the length of time the sound effect takes to play. However, in your case it is likely to be longer than that as you want a noticeable pause between each sound. Because the Wait command is in the custom route move, it does not have any effect on any other part of the game.
EDIT
Here is a snip shot showing what I am referring to. I have only given 2 SEs, but you could have any number in any sequence that you wanted. Always make sure the list ends with a Wait command, as the event will then loop back to the beginning.
Original thread: https://forums.rpgmakerweb.com/threads/delaying-an-event-without-effecting-the-rest-of-the-game.139850/