GameMaker Touhou Engine   Home   Downloads   Documentation

_DIALOGUE_CONTROLLER


The object that draws dialogue and handles dialogue progression.


Locals:


Name Value/Default Significance
_ACTORS_LEFT <sprite array>/noone The cutins of the characters that are to be displayed on the left side of the screen during dialogue (left to right).
_ACTORS_RIGHT <sprite array>/noone The cutins of the characters that are to be displayed on the right side of the screen during dialogue (right to left).
_DIAG_RECT_X <integer>/global._HUD_BORDER_LEFT + 5 The left X-coordinate of the black rectangle where text will be drawn during dialogue.
_DIAG_RECT_W <integer>/global._HUD_BORDER_LEFT - 5 - _DIAG_RECT_X The width of the black rectangle where text will be drawn during dialogue.
_DIAG_RECT_H <integer>/80 The height of the black rectangle where text will be drawn during dialogue.
_DIAG_RECT_Y <integer>/global._HUD_BORDER_BOTTOM - 5 - _DIAG_RECT_H The top Y-coordinate of the black rectangle where text will be drawn during dialogue.
_LINE_NUMBER <integer(-1-)>/-1 The number of the current line of dialogue (counted from 0).
_SEQUENCE_ARR_ACTOR_I <string array>/noone The string at position i represents the control string (see below) for line i.
_SEQUENCE_ARR_STRING <string array>/noone The string at position i represents the markup string (see _DRAW_MARKUP_STRING()) for line i.
_DRAW_TEXT <boolean>/false true: Text is being drawn. false: Text is not being drawn.
_TALPHA <real(0-1)>/0 The alpha value of the black rectangle where text will be drawn during dialogue at the time of access, also used to calculate the base alpha value of the character cutins.
_TEXT_ALPHA <real(0-1)>/0 The alpha value of the text being drawn during dialogue at the time of access.
_ACTOR_ALPHA <real(0-1)>/0.2 The alpha value of the active character cutins at the time of access.
_FADING <boolean>/true true: The initial fade-in effect is in progress. false: The initial fade-in effect is over.
_INTERMISSION <boolean>/false true: The progression of dialogue has been externally halted. false: The dialogue can progress normally.

Control Strings


A control string is a special string that tells GMTE which character/s are speaking during a given line of dialogue. A control string has the form of:


l n0 n1 ... nk r m0 m1 ... mp

ni and mi represent an index in _ACTORS_LEFT and _ACTORS_RIGHT respectively, signifying that the character whose cutin is located at that index is active. In order to
signify that no actors are active on a given side, n/m0 should be equal to the length of _ACTORS_LEFT/RIGHT and no other index should be named.


Events:


Trigger # Actions
Create 1 Set global._DIALOGUE_ACTIVE to false. Set local variables to default values.
Step 1 Increase the alpha-related local variables to achieve a fading-in effect for the text and character cutins. If there's a replay currently being played back and the Z-Key was pressed on the current frame, trigger the User Defined 0 event.
Draw 1 Draw the character cutins on both sides of the screen in the designated orders semi-transparently except for the currently active ones, draw the black rectangle that holds the text, before drawing the text using _DRAW_MARKUP_STRING(), all of this for the current designated line of dialogue.
User Defined 0 1 Advance the dialogue if it can be advanced.
Press Z-Key 1 If there isn't a replay being played back, trigger the User Defined 0 event.