GameMaker Touhou Engine   Home   Downloads   Documentation

_PRACTICE_SPELL_SELECT


The object that lets the player select and enter a spell for practicing.


Locals:


Name Type Significance
_SELECTED Non-negative Integer While selecting a stage, this is the number of the selected stage. While selecting a spell, it is the number of the selected spell when observed in order for the selected stage (counted from 0). A selection of -1 indicates the "Return" option is selected.
_CSTAGE Non-negative Integer The currently selected stage. A value of 0 indicates one hasn't been selected yet.
_CPLAYER Reference to Object The asset index of the currently selected player.
_STAGE_COUNTS Non-negative Integer Array The nth value in this array should hold the sum of all of the values before it, plus the number of cards that can be encountered on the nth stage. The value at index 0 should always be 0.
_SPELLS_PER_PAGE Positive Integer The maximum number of spell cards that can be displayed inside the selection menu at one time.

Events:


Trigger # Actions
Create 1 Declare local variables and global._SPELL_PRACTICE_PRE_ATTR.
Draw 1 Draw the stage or spell selection menu.
Press Left Arrow 1 Switch the selected player or go to the previous page of spell cards. (modify this event depending on which playable characters you have)
Press Up Arrow 1 Move the selection upwards.
Press Right Arrow 1 Switch the selected player or go to the next page of spell cards. (modify this event depending on which playable characters you have)
Press Down Arrow 1 Move the selection downwards.
Press X-Key 1 Return to the stage select or title screen.
Press Z-Key 1 Either enter the spell card selection menu for the selected stage or continue to the dedicated spell practice room if the selected spell card can be practiced.