Dialog skips in a cutscene

Started by PaleoGamerZ, Sun 17/06/2012 14:19:40

Previous topic - Next topic

PaleoGamerZ

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!

Khris

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.

PaleoGamerZ

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?

Khris

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
  object[0].Transparency = 50;

PaleoGamerZ

Oh!! Thanks, it works.

Thanks again!!

SMF spam blocked by CleanTalk