Adventure Game Studio

AGS Support => Beginners' Technical Questions => Topic started by: freeplayer on Fri 07/03/2014 10:37:41

Title: How to use corectly the function room_AfterFadein() ? Not working for me.
Post by: freeplayer on Fri 07/03/2014 10:37:41
Hello to you all.
I am new here, and also a beginner in the point and click game creation, but I find it very interesting and I am begining to get further and further each day!

I have a simple question. I want my character to say a text when first room starts. For example, just after the fadein, I want my character to say "Hi".
I read over forums, it would be the code (in room script):

Code (ags) Select
function room_AfterFadein()
{
     cHero.Say("Hi");
     aSound3.Play();
}


Also I added aSound3.Play(); because I wish a short sound would play when room starts.
I did that, but nothing happens.

I must say, I managed to put sounds on footsteps and also a "look at with dialog function". But I can't get the room_AfterFadein function to work.

PS: I am using AGS Editor .NET (Build 3.2.1.111).

Thanx!
Title: Re: How to use corectly the function room_AfterFadein() ? Not working for me.
Post by: Billbis on Fri 07/03/2014 12:27:57
Did you link the function with the event panel of the corresponding room ? You have to.
Title: Re: How to use corectly the function room_AfterFadein() ? Not working for me.
Post by: NickyNyce on Fri 07/03/2014 13:05:39
http://m.youtube.com/watch?v=r3w5TI7_a2g

This video and all the others should help you understand how to link the functions.
Title: Re: How to use corectly the function room_AfterFadein() ? Not working for me.
Post by: freeplayer on Fri 07/03/2014 13:16:03
Thank you. The video helped me! I got it to work now. And learnd also some new stuff.
Thanks!