Skip to content

Run Event Commands from within a dialog command

Sam Alhara requested to merge dialog-commands2 into master

Enables the use of {command:} blocks within dialog commands (i.e. speak commands). This is useful so that you can do things while a character is talking. Obvious uses include pausing for emphasis {command:wait;2000}, changing expression while talking {command:set_expression;Eirika;Smile}, and playing dramatically appropriate sounds from within dialog {sound;Thunderclap}, but I'm sure you can come up with more. In fact, all event commands are available, but, y'know, be reasonable.

Both {command:} and {c:} syntax is supported. You can nest commands within another speak command.

s;Eirika;Hello {c:s;Ephraim;Hi {c:sound;Jinx} There} There.

Although it is not recommended for sanity's sake, and because when you press A, only one of the speak dialog bubbles will actually turn off. You can use pop_dialog to get rid of the others if you need to.

The {command:} highjacks the currently existing event that the dialog is running in, which enables you to modify the event directly. Creating a new event to run these commands, although a simpler solution, would not allow you to modify the actors in the current scene. The dialog command is parsed at run time, as soon as it reaches the command while it is running the dialog.

Merge request reports