Adventure Game Studio

AGS Support => Beginners' Technical Questions => Topic started by: maniactcs on Fri 27/01/2012 20:33:44

Title: Play sound not appearing
Post by: maniactcs on Fri 27/01/2012 20:33:44
Hi all, this is my first post so go easy on me !  ;D
I have just started out creating my introduction to my game. I have been following densming's tutorials on YouTube and have reached the video that is titled 'How to use AGS Part 21 (Sounds and Music)'. After watching the video I attempted to try the
playsound(1) etc. in the room script but it doesn't seem to be working? Is this because I am using a newer version of AGS?

Sorry if this question is stupid I'm not to sure what I am doing wrong?

Thanks


Paul
Title: Re: Play sound not appearing
Post by: NickyNyce on Fri 27/01/2012 20:56:33
 I believe so...try this


aSound1.Play(eAudioPriorityNormal);
Title: Re: Play sound not appearing
Post by: maniactcs on Fri 27/01/2012 21:19:54
Thank you for the quick reply ! Giving it ago now !
Title: Re: Play sound not appearing
Post by: maniactcs on Fri 27/01/2012 21:22:08
All I got was this error? ,'

Failed to save room room1.crm; details below
room1.asc(10): Error (line 10): Undefined token 'aSound1'

I have already converted the sound to a wav file
and put it in a sound folder in my game directory? its called sound1.wav
Title: Re: Play sound not appearing
Post by: monkey0506 on Fri 27/01/2012 22:10:17
To confirm, what version of AGS are you using? The latest versions have a revamped audio system, where you actually import your music and sounds via the editor's Audio branch. If you're using an older version then you would need to use the separate directories in your project folder and use the PlaySound-style commands.
Title: Re: Play sound not appearing
Post by: maniactcs on Fri 27/01/2012 22:37:54
Hi I'm using the latest version of AGS, is there any tutorials on how to add sounds with the latest version?
Title: Re: Play sound not appearing
Post by: NickyNyce on Fri 27/01/2012 23:03:23
What exactly is the name of your sound in the sounds tree..?  Try to rename it aSound1, then try it again.

Don't add the wav at the end, just aSound1

From the beginning...Go to your audio folder, go to sounds, right click, add sound, rename it aSound1



Title: Re: Play sound not appearing
Post by: Icey on Fri 27/01/2012 23:06:36
Try going to the Backwards compatibility section in the General settings menu and put False on the audio one.

Next put what you had in the beginning before asound1.play();

Also to get asound1.play(); to work you must import the song into AGS.
Title: Re: Play sound not appearing
Post by: maniactcs on Fri 27/01/2012 23:55:10
Thanks for all your help im going to try the suggestions you have given me now :)
Title: Re: Play sound not appearing
Post by: maniactcs on Sat 28/01/2012 00:20:42
Works a treat thank you to all :), quick question how do you hide the character? im creating a text overlay for the cut scene but the character is still visible on the screen?
Title: Re: Play sound not appearing
Post by: maniactcs on Sat 28/01/2012 00:24:41
ok sorted it now, thank you everyone for your help !! :D
Title: Re: Play sound not appearing
Post by: Icey on Sat 28/01/2012 03:59:00
No prob. Also make a view that has Blank(Sold pink) sprite frames and change the character to that view when you want to hide him.
Title: Re: Play sound not appearing
Post by: Khris on Sat 28/01/2012 11:18:34
No, set their Character.Transparency to 100 instead.