MPUZ: Dialogs

From Mario Fan Games Galaxy Wiki
This information is subject to change.
MPUZ
Mpuz logo.png
Development Main Page
Basics
Intermediate
Advanced
  • none
Reference
[Edit]


Dialog (.mpd) files are a useful way to store lines of dialog for characters. While this could be done within the object's code or the level script, that's usually inefficient. Dialog files also allow for multiple languages to be used; one file per language. Try doing that in object code.

Dialog files are easy to create, as they are nothing more than XML files. For an example of how this file could be formatted, check out MPUZ's main script file (en.mpd) in the \Data\Languages directory.

A dialog file must be loaded in the level before it can be used; this is done with the level:dialog() function inside the level script. Once a dialog is loaded, it is accessed with the object:say() function. Further information on how these functions are used may be found on the functions page.