I'm wanting to make to where the player has to wait till after a sound effect

I want them to have to wait till after the sound effect is played. I tried to add a wait command but it only waits till after the player clicks past the the text box. So if the player reads the text box while listening to the sound effect then it uses the wait time after the click. Making them have to wait so much after the sound effect before the next scene starts. Or if they click away the text box then they only have to wait the time and sometimes it doesn't wait long enough bringing up the new text box before the sound effect finishes.
Here's what I'd do ...

Create an event with a single event page.

Condition it by a switch.

Set it to parallel process.

Have two event commands: Wait X Frames (however long the sound effect should take to play), and Control Switches (whatever switch is used as the condition for the event) = OFF.

Then in your main event, do this:

Code:
Play SEControl Switches (whatever switch you're using in the other event) = ONShow TextLoop  Conditional Branch: Switch (same switch again) = OFF    Break Loop  Branch EndRepeat Above
What will happen is that your SE will play, the switch will be turned on, and the message displayed. The player can click to close the message, but the loop will ensure the event doesn't continue until that delay is over and the switch is turned off again. So if they click straight away, it will go into the loop, and wait for the countdown to finish and the switch to be turned off. If the SE plays and the switch is turned off while the message is still being displayed, then as soon as the message box is closed, the switch will already be off, and it will drop right through the loop.
sweet thanks because I was having a hard time syncing it up now it is s cutscene so do I still need to make a separate event one question though where does the switch go that turns on the single page event how many frames is 27 seconds on windows media player?
Yes, still make it a separate event. The reason is, if you had it as one event and did the SE and then waited, it would wait for the SE to end before bringing up the text box. But if you had the text box before the wait, well, you don't know how long they'd have the text box open, so the SE could already be finished, and then you'd make them wait even longer.


You'd turn the switch on just after playing the SE, and just before the Show Text command.


There are other approaches you could take that could confine it all to one event, now that I think about it a little more.


Before playing the SE, you could put the current game time into a variable and add 27 seconds to it. Then do your SE and Show Text, and then still do a loop, but inside the loop you'd put the current game time into another variable, and your condition would be a comparison of the variables - if the second one (current game time) => the calculated game time (previous time + 27 seconds), then break.


Or, before playing the SE, you could set a timer to 27 seconds. Then in your loop, your condition would be whether the timer was up, and if it was, then break.


You might find one of those methods a little easier, since they'd both use actual seconds, rather than frames. With frames, you'd have to take your frame rate into account, which can be adjusted manually and doesn't have to default to 60 fps.


27 seconds is a long time to make the player sit there doing nothing, btw. Especially if there's nothing happening in the cutscene except a message, which they can close at any time, and the SE.
no the sound effect is a old english lullaby well atleast the first verse so I want it to play out and the text box with the lyrics to show up so they can see what she is saying
okay - any of those three methods should allow the player to close the message box at any time, but still force the player to wait until the ME is finished.
ok thank you so much do you care if I credit you on the credits of this game I'm gonna go back and credit all the people who helped me on the forums

like  and a special thanks to ............. for teaching me the rpg maker vx ace system kinda credit 
I don't care. It's only a small thing 🙂


Come back and say if it worked or not.
is this what you ment on the third one 

script for timer.png

cause with this setup if the player clicks it shows next text box and continues the movement before the SE is up

and for the second one where do i find game time
No, in the loop, you don't stop the timer. You do a conditional branch and see if the timer is 0 or less.

Mmm ... wait - I just tried it and it didn't work like I thought it would. Give me a minute to play with it a bit.

Edit: Okay, this works, but I don't like it, because it shows the timer on the screen. If you didn't mind that, or you had a script that stops the timer being displayed, you could use this:

Control Timer: Startup (0 min. 27 sec.)Play SE/MEShow Text (whatever you want displayed)Loop Wait: 5 frames Conditional Branch: Timer 0 min 0 sec or less Break Loop Branch EndRepeat AboveControl Timer: StopIf you don't have a script to hide the timer and you don't want it on the screen, use this instead (change the variables you use):

Code:
Control Variables [0005: Target Time] = Play Time (in Game Data > Other)Control Variables [0005: Target Time] += 27Play SE/MEShow Text (whatever you want displayed)Loop  Wait: 5 frames  Control Variables [0006: Current Time]  Conditional Branch: Variable [0006: Current Time] >= Variable [0005: Target Time]    Break Loop  Branch EndRepeat Above
sorry I fell asleep lol thanks I'll try that now

how do i do the

= play time (in game data > other)
Click the Control Variables option and choose your variable. Then choose Game Data, then choose Other, then choose Play Time.
ok thanks

ok how do i do the control variables [007:current game time] with out putting add, sub,mul,div,mod and not putting anything under 

I think i may have figured it out but not sure

it works but the text box with lyrics doesn't pop back up is it not supposed to ?

either way doesn't matter I'm happy it doesn't move on till right after the SE thanks

everything worked great it's been solved thanks to shaz
Is there a way to make an airship sound that only plays the sound but allows the airship to function normally?
Necro-post notice: UndeadGamez

It's 4 years since the last post.

You also have a different query from that of the OP. Even if this weren't a necro post, I'd ask you to make a new thread so as not to hi-jack someone else's.

Moderator note: Closing

Original thread: https://forums.rpgmakerweb.com/threads/im-wanting-to-make-to-where-the-player-has-to-wait-till-after-a-sound-effect.17027/