sound and video returns?

This forum is meant for requesting technical support or reporting bugs.

Moderators: time-killer-games, Vengeance66, Candle, reneuend, GM-Support

sound and video returns?

Postby Stitches » Thu Mar 06, 2014 3:59 pm

Hi. I have a frame with a mumbling character on it. When you look at him or talk etc or interact with anything in the frame, I have random sounds play over a video overlayed in th frame. This is all fine. However, once the player has interacted with something and the random sound has played, how do I get it to go back to the original sound playing? I trid a huge code with timed eents but kept getting errors.
I tried a timed event which played the mumble again after a certain amount of seconds, but this just made a load of timed events and caused a few probs. There must be some script i'm missing to be able to stop main sound (what could be considered background), then play a sample, then return to the original sound after the sample has played.

Can anyone direct me? :)
http://www.youtube.com/user/MaynardStaly/videos and http://libertycap.webs.com
“With a bit of luck, his life was ruined forever. Always thinking that just behind some narrow door in all of his favorite bars, men in red woolen shirts are getting incredible kicks from things he’ll never know.”
User avatar
Stitches
Active Member
 
Posts: 71
Joined: Tue Nov 12, 2013 3:56 am
Location: UK

Re: sound and video returns?

Postby reneuend » Fri Mar 07, 2014 4:05 am

I think we can do this very simply by using 3 different frames.
Assumption: your video is in a hotspot.
If we start with Frame1 with the "original sound" and set the Frame properties "Enable Timer" and set the length of time based on the sound length. Then set the destination frame to Frame2 (random sound frame).
Frame2 gets interesting. All the random sounds will be the same length (say 10 seconds). In the frame properties, we will have a variable to track how many times the frame has been loaded. After it has loaded nth number of times, we will go to Frame3, which will play the original sound and look like Frame1, but won't have the "Enable Timer" set. Also in Frame2, you will call a subroutine in the frame properties that will select a random sound.

1. Make each of your random sounds the same time length. Lets say 10 seconds.
2. Create 3 frames
A. Frame1: Original sound
a. Enable Timer, Go to Frame2
B. Frame2: Random sound
a. FrameLoad = FrameLoad + 1
b. If FrameLoad >= nth sound then goto frame3 else PlayRandomSound()
C. Frame3: Original sound

Does this make sense?

NOTE: if your video is in the background, then this will still work, but requires modification with Frame1 enable timer. The time should be small because it will be based on the video length and NOT the sound length.

Let me know if you have any questions!

Good Luck!

Ps. I know this works because I'm doing something similar in the game I'm working on! :wink:
---


Image
Image
User avatar
reneuend
Administrator
 
Posts: 2680
Joined: Sat Nov 22, 2008 8:37 pm
Location: Midwest Cornfield, USA


Return to Adventure Maker Technical Support and Bug Reports

Who is online

Users browsing this forum: No registered users and 3 guests

cron