Adventure Game Studio

AGS Support => Beginners' Technical Questions => Topic started by: PaleoGamerZ on Sun 17/06/2012 14:19:40

Title: Dialog skips in a cutscene
Post by: PaleoGamerZ on Sun 17/06/2012 14:19:40
Hi there!

I didn't find information about this anywhere so here is my question.

Making a cutscene I put a dialog in there, but the dialog is "jumped" at the end of the cutscene so when the cutscene finish the dialog starts (But obviously I put the dialog.Start() lines before)

It is something like that:

    StartCutscene(eSkipESCOnly);
    Mouse.Visible = false;
    //Animations here
    EndCutscene();
    Mouse.Visible = true;
   
    dDialog.Start();
    //Animations here too but these aren't skipable

The game executes the "Animations here too" and then the dDialog starts. Can anyone help me?
If you need more lines of my script to see where is the problem, please tell me.

Thanks!
Title: Re: Dialog skips in a cutscene
Post by: Khris on Sun 17/06/2012 14:33:21
It's right in the manual, in the Dialog.Start() description:
QuoteNOTE: The conversation will not start immediately; instead, it will be run when the current script function finishes executing.

This is also a question that has been asked and answered countless times, so I will simply refer you to the forum search (http://www.adventuregamestudio.co.uk/yabb/index.php?action=search).
Title: Re: Dialog skips in a cutscene
Post by: PaleoGamerZ on Sun 17/06/2012 23:12:03
I've been searching about it in the manual and the forums, but I don't find anything to help me. Anyway I tryed to put the cutscene which goes after the dialog into a new dialog so when the last dialog finishes it calls the dialog with the final part of the cutscene; but then I can't use the objects of the room in the dialog.
Any solution?
Title: Re: Dialog skips in a cutscene
Post by: Khris on Mon 18/06/2012 00:38:37
You can use standard script commands inside dialog scripts, just indent the line by at least one blank space.
That way you can put the commands directly inside the dialog or put them in a function and call that, to avoid duplicate code.

To answer the second question, you can access the current room's objects and hotspots in a global context by using the hotspot and object array:
Code (ags) Select
  object[0].Transparency = 50;
Title: Re: Dialog skips in a cutscene
Post by: PaleoGamerZ on Mon 18/06/2012 00:52:31
Oh!! Thanks, it works.

Thanks again!!