Can't Trigger Audio File From Either Hotspot :( [SOLVED ;(]

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

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

Can't Trigger Audio File From Either Hotspot :( [SOLVED ;(]

Postby 3dgamer » Thu Jan 08, 2009 8:59 am

I have two hotspots, one over top of the other (one is a bit bigger than the other) and I am trying to trigger an audio file to play when the hotspot is pressed for either hotspot, but the audio is not playing. I don't care which hotspot it triggers from because they are very close in size, so the player should be able to enable the audio from either. I just don't know why if the hotspots are on top of one another that one of them can't trigger the audio file.

(Btw, I am only loading the audio in one hotspot at a time when I test. I didn't think I needed to have it in both, right?)

Also, I played around with hotspot order (top/bottom) and still no go. :( I'm running out of options here so any help would be most appreciated.

TIA

-----[edit]------------

Btw, I did do a "test hotspot" somewhere else in the scene and triggered the audio file from that hotspot and it works just fine. So the audio can be triggered, just not from where I need it to be. :(

Also, the two hotspots I am using work in tandem; they are hotspots for a lit candle. If the hotspot "A" is enabled, it triggers hotspot "B" to show a picture of the candle blown out. This does work. I am trying to add the candle puff sound. This is what is not triggering from either of the two hotspots.

Hope that helps some.

TIA
Last edited by 3dgamer on Fri Jan 09, 2009 3:23 am, edited 1 time in total.
3DGamer
User avatar
3dgamer
Expert Member
 
Posts: 301
Joined: Mon Dec 15, 2008 7:12 am

Postby Lyberodoggy » Thu Jan 08, 2009 1:22 pm

Hmmm what code did you use?
User avatar
Lyberodoggy
Administrator
 
Posts: 2526
Joined: Sat Feb 17, 2007 3:31 pm
Location: Athens

Postby mercedes » Thu Jan 08, 2009 4:31 pm

Hi there..:)

(Btw, I am only loading the audio in one hotspot at a time when I test. I didn't think I needed to have it in both, right?)


Have u tried to enable it in both..?

If you have it in the one underneath..then no..i don't think u would hear it..If its the one on top..you should..Unless u have variables set..and the variable haven't met..In other words..it hasn't become 1 yet..then when testing it, unless u trigger the variable..then u won't hear it either..:)
User avatar
mercedes
VIP
 
Posts: 2460
Joined: Sun Mar 09, 2008 10:43 pm
Location: Canada..~

Postby 3dgamer » Thu Jan 08, 2009 8:37 pm

Lyberodoggy wrote:
Hmmm what code did you use?



Hi Lyberdoggy,

At this point, no code was used, just variables.


mercedes wrote:Hi there..:)


Hi Mercedes. :)

mercedes wrote:Have u tried to enable it in both..?


Yes, I have. It doesn't seem to work when I tried to assign the audio to both hotspots.

mercedes wrote:If you have it in the one underneath..then no..i don't think u would hear it..If its the one on top..you should..Unless u have variables set..and the variable haven't met..In other words..it hasn't become 1 yet..then when testing it, unless u trigger the variable..then u won't hear it either..:)


Well, I have tried the one on top and on the bottom, but no go.

I am using variables and set the audio to trigger on the hotspot after its variable had been fulfilled. The hotspot picture shows after being triggered, but the audio still can't be heard. :(

I even tried other tracks for the audio, but still nothing. :(

I am thinking that I may have to trigger the file by using code. I've been trying to find a sample code for audio on the AM Help website, but for some reason can't find one (both pages for references and tips seem to be down). Do you know of any code to do this?

Thanks a lot. :)
3DGamer
User avatar
3dgamer
Expert Member
 
Posts: 301
Joined: Mon Dec 15, 2008 7:12 am

Postby Mystery » Thu Jan 08, 2009 8:55 pm

Hmmm, this seems very strange to me that you are able to trigger other actions but not sound from those hotspots :shock:

You find the code for sound and video at almost the bottom of this page (chapter 29):
http://www.adventuremaker.com/help/vbsc ... niques.htm

(if you're using scripting for sound/video, make sure you copy the files into the external folder of AM, otherwise they won't work in the compiled game)
User avatar
Mystery
Forum Admin and Games Page admin
 
Posts: 2990
Joined: Sat Feb 04, 2006 8:12 am
Location: Switzerland

Postby Lyberodoggy » Thu Jan 08, 2009 10:48 pm

Did you turn the speakers on? Sorry for this question, but seems impossible to not be able to play sound from the hotspot. Maybe the hotspots are disabled during runtime due to faulty variable set or the file is corrupted
User avatar
Lyberodoggy
Administrator
 
Posts: 2526
Joined: Sat Feb 17, 2007 3:31 pm
Location: Athens

Postby 3dgamer » Fri Jan 09, 2009 12:02 am

RESPONSE 1

Mystery wrote:Hmmm, this seems very strange to me that you are able to trigger other actions but not sound from those hotspots :shock:

You find the code for sound and video at almost the bottom of this page (chapter 29):
http://www.adventuremaker.com/help/vbsc ... niques.htm

(if you're using scripting for sound/video, make sure you copy the files into the external folder of AM, otherwise they won't work in the compiled game)


Hi Mystery,

Yeah, it is very strange. :(

Thanks for the page info. I found out I was having a browser problem and couldn't access the page earlier.

I went ahead and inputted the code as outlined in #29. After putting all the code into the VBS Global Procedures text box, I put this code in my hotpsot VBS text box:


PlaySound GetPath(5) + "puff_FILE0986_edit2.WAV", False
StopSound


However I got an error message (please see uploaded image).
(btw, GetPath(2) yields the same error message)

You mention "external folder"; is that the subfolder in the Project Resource Files / "Resource Management" folder?

Well, I took this piece of code out. Then I ran another test and the strangest thing happened....I reverted back to the way I had it and ran the frame. When I clicked the hotspot, nothing happened at first. But I decided to keep clicking it, just for grins, and then I started hearing noises as if the file was trying to play. Then I DID hear it play! This happened several times where I heard "junk" noise, and then the actual sound I should have heard from the file (a puff of air sound for the candle blowing out). So this is truly bizarre; the audio does eventually play, but not after several clicks on the hotspot and not after several junky noises first.

What makes it particularly odd is that I KNOW that the audio file is okay because if I use it in a test hotspot not associated with either candle hotspots, it plays just fine.

Any help in resolving this would be truly appreciated. Thanks for the help.


RESPONSE 2

Lyberodoggy wrote:Did you turn the speakers on? Sorry for this question, but seems impossible to not be able to play sound from the hotspot. Maybe the hotspots are disabled during runtime due to faulty variable set or the file is corrupted


Hi Lyberodoggy,

Yep, speakers are up and loud and clear because I can hear all the other sound effects in the frame. And the audio file is a good one.

The only thing with the variable is that it does seem to be working, but only for the image, not for the sound. At least not unless I click for a zillion times and then finally get to hear the sound (please see above). That would not be acceptable for playing any game. Any suggestions you have will be most appreciated.

Thanks for the help.
Attachments
vbs_sound_code_error_001.JPG
This what happens when I use this code to play sound
vbs_sound_code_error_001.JPG (15.43 KiB) Viewed 4363 times
3DGamer
User avatar
3dgamer
Expert Member
 
Posts: 301
Joined: Mon Dec 15, 2008 7:12 am

Postby Mystery » Fri Jan 09, 2009 12:41 am

Hmmm, yeah strange things happen with you :P

Just an idea: It could be because you put the stop sound command right after the play command.
Just put the play command.
You can use the stop command when you go for example to another screen, and then want to stop the music. :)
User avatar
Mystery
Forum Admin and Games Page admin
 
Posts: 2990
Joined: Sat Feb 04, 2006 8:12 am
Location: Switzerland

Postby mercedes » Fri Jan 09, 2009 12:42 am

Hi there...the code for sound is wrong...:)

PlaySound GetPath(2) + "puff_FILE0986_edit2.WAV", False

Not sure why u had "stop sound" i think that could have been y our automated error..

Also if u are hearing sound and whilst u are clicking it..and it comes and goes like...almost like its trying to play...Sometimes that happens when u have the variable set to 0 and to 1..Or u have it 1 and 1 that sort of thing...like u have code and its colliding..or variables are colliding more or less..

If you have any code in the Advanced TAb...can u display it here..3D..not sure if u do or not...:)
Edit..i just read u have no code..lol..
Also, double check all of your variable tabs...might be that..:? Sometimes we set variables and forgot we set them..:P..

Peace
User avatar
mercedes
VIP
 
Posts: 2460
Joined: Sun Mar 09, 2008 10:43 pm
Location: Canada..~

Postby 3dgamer » Fri Jan 09, 2009 3:22 am

Okay, I am pleading for the mercy of the court right now (at this time the court consists of Mercedes, Mystery and Lyberodoggy)

<sigh> I did everything that everyone told me to do; I checked codes, changed codes, checked variables, changed variables, still no sound (of course unless I had clicked the hotspot a thousand times!)

"Then I says to myself, I says, '3dgamer, maybe the audio file is corrupt some how?'" [yep, Lyberodoggy , your words of wisdom re-echoed through my head.]

So I go and check the specs against other audio files that work in the frame and the specs seemed okay. The file also played okay in other media apps.

Then I looked at the length of the audio clip and saw that it was very short. So I thought, well maybe lengthen it a bit, because all the other sounds in the frame were playing fine, but they were somewhat longer.

Anyways, I do all this stuff to lengthen it ,etc., ad infinitum Well, to make a long story short, I add the new audio file to the hotspot and I notice the longer version is playing but I am hearing the tail end of the file.

Still puzzled, but hopeful, I start to see what else I could try, just to see what I could improve, and guess what I see when I go to change the audio file? Okay, I'm gonna have to scream here to let it all out of my system:

I SEE THAT THE "FADE" BOX WAS CHECKED AND SET TO 2 SECONDS!!!!

So what does a 2 second fade and a 1 second sound effect equal? You got it....ABSOLUTELY NOOOOOOOTHING!!! ;( [That is, unless you click the living daylights out of the hotspot!] AAAAARRRGH!

Of course when I unchecked the fade box in the audio properties tab, the audio file worked perfectly fine, as if to say, "hello, I've been waiting for you all this time".

<sigh> Sorry to put you all through the exercise of futility. I guess it is the casualties of being a newbie. I'll try checking boxes and other sorts of things better in the future. It's just that this is all so new; I ended up focusing on the tougher stuff than the simple stuff. <sigh - shakes head>

Well, thanks to EVERYONE for your patience and please hand down to me a light sentence this time, will ya? ;)

Cya!
3DGamer
User avatar
3dgamer
Expert Member
 
Posts: 301
Joined: Mon Dec 15, 2008 7:12 am

Postby mercedes » Fri Jan 09, 2009 12:41 pm

Hi there...

Glad to hear you solved it :D......

Isn't that usually the case..its always something small like that....:lol:...and don't feel bad..the fade option--kinda funny if u think about it....The sound was "fading" in and out...big clue there...:P

Adieux~
User avatar
mercedes
VIP
 
Posts: 2460
Joined: Sun Mar 09, 2008 10:43 pm
Location: Canada..~

Postby Lyberodoggy » Fri Jan 09, 2009 1:26 pm

Haha... I think that you were punished by Luck, since you 've tested the game so much, that probably your mouse left button is broken right now :lol:

No worries, this will teach you to avoid this mistake in the future :P
User avatar
Lyberodoggy
Administrator
 
Posts: 2526
Joined: Sat Feb 17, 2007 3:31 pm
Location: Athens

Postby Mystery » Fri Jan 09, 2009 10:24 pm

I'm very glad to hear that you could figure out what was wrong :D

Don't worry, as Mercedes said, small things with huge effects happen now and then when you make a game ;)
User avatar
Mystery
Forum Admin and Games Page admin
 
Posts: 2990
Joined: Sat Feb 04, 2006 8:12 am
Location: Switzerland

Postby 3dgamer » Sun Jan 11, 2009 2:06 am

Thanks a lot, Mercedes, Lyberodoggy, and Mystery for being so understanding. I just hate wasting people's time, especially for something so simple. Thanks for not throwing the book at me! :)

Have a nice one.
3DGamer
User avatar
3dgamer
Expert Member
 
Posts: 301
Joined: Mon Dec 15, 2008 7:12 am


Return to Adventure Maker Technical Support and Bug Reports

Who is online

Users browsing this forum: No registered users and 0 guests