GameMaker Touhou Engine   Home   Downloads   Documentation

_REIMU


An example of a player character object.


Parent: _PLAYER_PARENT


Locals:


Name Type Significance
_BOMB_TIMER Boolean Whether or not the player can bomb.
_SHOT_TIMER Boolean Whether or not the player can shoot their primary shot.
_SHOT_TIMER_SEC Boolean Whether or not the player can shoot their secondary shot.
_THIS_DEAD Boolean Whether or not the player's deathbomb timer should start ticking on the current frame.
_FOCUSED Boolean Whether or not the player is focusing on the current frame.
_SHOOTING Boolean Whether or not the player is attempting to shoot on the current frame (does not tell you whether the player has actually shot anything).
_BOMBING Boolean Whether or not the player is attempting to bomb on the current frame (does not tell you whether the player has actually bombed).
_MOVEDIR Non-negative Integer The direction that the player moved in this frame.
_REPLAY_EVENT_INTEGER Non-negative Integer A byte that contains information about the current frame, to be stored inside the replay. (see global._REPLAY_DATA)

Events:


Trigger # Actions
Create 1 Declare local variables and player-related global variables, set Alarm 3 (the invulnerability timer) and create various objects necessary for play (e.g. the hitbox). Write the header of a replay file into the replay buffer.
Alarm 0 1 Enable the player to shoot their primary shot.
Alarm 1 1 Kill the player.
Alarm 2 1 Enable the player to shoot their secondary shot.
Alarm 3 1 Make the player vulnerable.
Alarm 4 1 Enable the player to bomb.
Step 1 Start the deathbomb timer depending on the corresponding local variable.
Step 2 Move the player depending on _MOVEDIR.
Step 3 Shoot and/or bomb if the player is attempting to (_SHOOTING/_BOMBING) and is able to (_TIMER locals).
Begin Step 1 Based on the state of the keyboard, set the values of various locals and perform various User events within other instances. Using the updated locals, update the replay byte and write it into the global buffer (global._REPLAY_DATA).
End Step 1 Bring the player back into the play area if they've managed to get out of it while moving.