cPlayer.say on room loaded!

Started by Andersk, Fri 05/05/2017 16:01:47

Previous topic - Next topic

Andersk

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!

CaptainD

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?
 

Andersk

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!

Khris

In the room editor, add the "first time player enters room" event. Then put the command in the function AGS created for you.

Andersk

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!

SMF spam blocked by CleanTalk