Dialogues & cutscenes

Started by Calin Leafshade, Wed 30/09/2009 23:05:40

Previous topic - Next topic

Calin Leafshade

Since dialogs only start once a script has finished whats the best way to script a cutscene with a dialogue in the middle?

So:

Some stuff happens
Run dialog
Some more stuff happens

If you scripted it like that the dialog would happen at the end instead of the middle.


Matti

Use variables  :)

For example: Set a bool to true at the end of the dialog and let the 2nd stuff only happen when it's true.

Calin Leafshade

But that still doesnt solve the problem.

If the cutscene runs in the "afterfadein" sub the dialogue still runs after the rest of the sub.
So if you were to use variables you would need to have multiple functions or a function you call multiple times which seems less than elegant.

I've actually decided to put the cutscene script INSIDE the dialogue script.. but that seems less than ideal.

discordance

You could always just call a function at the end of the dialogue script. That might be a little cleaner.

Pumaman

Quote from: Calin Leafshade on Wed 30/09/2009 23:59:02
I've actually decided to put the cutscene script INSIDE the dialogue script.. but that seems less than ideal.

This is basically the best workaround. Put the before script in the Enters Room event in the normal place, then put the after script in the dialog script where it closes the dialog.

SMF spam blocked by CleanTalk