Adventure Game Studio

AGS Support => Beginners' Technical Questions => Topic started by: goldensox on Wed 09/01/2008 19:39:58

Title: Introduciing Dialog
Post by: goldensox on Wed 09/01/2008 19:39:58
Hi ppl, you know, im wuite new on AGS and i need help doing a really simple thing. Also, before  some advanced menbers go apeshit, i searched the entire forum for one solution and didnt found anything.

well, as i was saying, does anyone knows how do i make an starting dialog to my game, like they did on 4 of clubs? thanks by the time...
Title: Re: Introduciing Dialog
Post by: on Wed 09/01/2008 23:10:03
I think you are talking about a cutscene here. You do the following:

For the starting rooms "player enters (after fadein)" even, you make a runs script- action.

In the editor, write:

StartCutscene();
player.Say("My name is Guy Brush. I wanna be a pirate!");
cCharacter.Say("Your name is what???");
EndCutscene();

And that's it- all the stuff you write between the cutscene commands are executed automatically.

(You will need to replace cCharacter by the script name of some character in your game, though  ;) )

Title: Re: Introduciing Dialog
Post by: goldensox on Wed 09/01/2008 23:50:02
thank you so much dude, i just needed to know dat to star doing my game!
Title: Re: Introduciing Dialog
Post by: Khris on Wed 09/01/2008 23:55:50
Exactly. goldensox, it's not surprising you didn't find that answer in the forums right away because searching for such a specific thing is, well, impractical.

Solving your problem is as easy as combining pieces of knowledge like
a) the game starts at the room entered as starting room in the player character's settings
b) when a new room is loaded, AGS runs the room's "before fadein" event, fades in, then runs the room's "after fadein" event

I almost read your post as some sort of complaint, btw. I'm sure that's a misunderstanding on my part, otherwise I had to go apeshit.
Title: Re: Introduciing Dialog
Post by: goldensox on Thu 10/01/2008 00:52:16
damm, its saying 'not enough parameters to call function'


how i fix that?
Title: Re: Introduciing Dialog
Post by: Dualnames on Thu 10/01/2008 11:28:31
No problem.. Ghost forgot to mention that StartCutscene uses enum
which means that if you have the auto complete option on on the editor
when you type StartCutscene( some options will appear it's how you want players to skip the scene. i use:
StartCutscene(eskipESConly); which enables the player to skip using ESC key.
Title: Re: Introduciing Dialog
Post by: Khris on Thu 10/01/2008 16:25:38
That error message states the line, so where's the problem with looking up the command inside that line in the manual?
I mean, I don't see how the error message could be even more clear.