Events
Last updated
Last updated
Monogatari has a lot of useful events that fire when certain engine events happen. These can be used to run your own custom functions with monogatari.on ()
.
For example, the following code will create a function that will be run every time the didLoadGame event fires:
Below is an in-progress list of all events Monogatari has.
Event
Description
Details
willInit
willSetup
didSetup
willBind
didBind
didInit
Event
Description
Details
willPreloadAssets
assetLoaded
assetQueued
didPreloadAssets
Event
Description
Details
willRunAction
didRunAction
willRevertAction
didRevertAction
configurationElementWillUpdate
configurationElementUpdate::<Options.js Key>
configurationElementDidUpdate
Event
Description
Details
willLocalize
didLocalize
Event
Description
Details
willLoadGame
Event fires at the start of a save file load
After the player clicks to load the game but before the game finishes loading.
didLoadGame
Event fires after a save file load
After a save file has finished loading and all storage variable are set, but before anything is drawn to the screen and before players have control.
Event
Description
Details
didFinishTyping
Event fires after dialog text finishes
After every line of dialog in Monogatari's typewriter animation finishes and the player is able to click to get a new line. This includes at the end of the animation, as well as after clicking to skip the animation, or after every fed line if typewriter animation is disabled.