import { EventRunner, GameState, type DialoguePresenter } from '@datamoc/mwg/rpg';declare const present: DialoguePresenter; // two-d/ui.messageBoxPresenter(windows), typicallyconst runner = new EventRunner({ present, game: new GameState() });await runner.run([ { say: 'A cold wind blows.' }, { setSwitch: 'doorOpen', value: true },]); Copy
import { EventRunner, GameState, type DialoguePresenter } from '@datamoc/mwg/rpg';declare const present: DialoguePresenter; // two-d/ui.messageBoxPresenter(windows), typicallyconst runner = new EventRunner({ present, game: new GameState() });await runner.run([ { say: 'A cold wind blows.' }, { setSwitch: 'doorOpen', value: true },]);
Readonly
Runs a graph of passages starting at start, following goto commands and choice jumps until a passage runs out or the script is cancelled - the EventCommand counterpart to StageScript.runStory.
start
goto
EventCommand
StageScript.runStory
Example