Adventure Game Studio

AGS Support => Beginners' Technical Questions => Topic started by: Andersk on Fri 05/05/2017 16:01:47

Title: cPlayer.say on room loaded!
Post by: Andersk on Fri 05/05/2017 16:01:47
Hi,

I've got a basic of the basic questions if anybody could help.

I am trying to get the player to talk as soon as the room is initialized. I've done this before and I've tried everything but I can't remember. I feel like a dummy but I've tried game_start() with cPlayer.Say("Blah Blah Blah"); and all kinds of events with the line to try to make it happen, but he just won't talk as soon as the room is loaded. I just forget how to do it and I'm getting frustrated so I just figured I'd ask on the forums.

Anybody want to point me to the documentation or give me the scripting line for this? I'll also take my whip lashings for being so silly. :P

Thanks in advance!
Title: Re: cPlayer.say on room loaded!
Post by: CaptainD on Fri 05/05/2017 16:30:29
I'm not a particularly good coder but I would have thought putting it as the first item in function room_AfterFadeIn() should do the trick?
Title: Re: cPlayer.say on room loaded!
Post by: Andersk on Sat 06/05/2017 03:53:36
Quote from: CaptainD on Fri 05/05/2017 16:30:29
I'm not a particularly good coder but I would have thought putting it as the first item in function room_AfterFadeIn() should do the trick?


I thought it might be something like that. I'll have to check. Thanks!
Title: Re: cPlayer.say on room loaded!
Post by: Khris on Sat 06/05/2017 09:31:24
In the room editor, add the "first time player enters room" event. Then put the command in the function AGS created for you.
Title: Re: cPlayer.say on room loaded!
Post by: Andersk on Sat 06/05/2017 12:04:14
Quote from: Khris on Sat 06/05/2017 09:31:24
In the room editor, add the "first time player enters room" event. Then put the command in the function AGS created for you.

Oh my gosh, thank you! That was it! I forgot completely, it's been awhile since I used AGS. hahaha! :cheesy:

Thanks again!