GameMaker Touhou Engine   Home   Downloads   Documentation

_REIMU


An example of a player character object.


Parent: _PLAYER_PARENT


Locals:


Name Value/Default Significance
_BOMB_TIMER <boolean>/false true: The player's bomb is on cooldown. false: The player can bomb.
_SHOT_TIMER <boolean>/false true: The player's primary shot is on cooldown. false: The player can shoot their primary shot.
_SHOT_TIMER_SEC <boolean>/false true: The player's secondary shot is on cooldown. false: The player can shoot their secondary shot.
_THIS_DEAD <boolean>/false true: The player should die. false: The player should not die.

Events:


Trigger # Actions
Create 1 Set local variables to default values. Declare player and player familiar related global variables, set Alarm[3] to an arbitrary value. Create _HITBOX_OBJECT, _AURA and _REIMU_YIN_YANG.
Alarm[0] 1 Enable the player to shoot their primary shot.
Alarm[1] 1 If the player is not immune to damage, destroy _HITBOX_OBJECT, _AURA and all instances of global._PLAYER_FAMILIAR. Then, if the player has extra lives remaining, create power items and deduct a life. If the player is out of lives, create full power items and bring up the continue menu. Change the player's power level accordingly, set the spell card bonus to 0, then destroy self.
Alarm[2] 1 Enable the player to shoot their secondary shot.
Alarm[3] 1 Set global._PLAYER_IMMUNE to false, destroy any instance of _SPELL_CARD_TEXT_P.
Alarm[4] 1 Enable the player to bomb.
Step 1 Move the player depending on what key is currently pressed if they are within the bounds of the play area.
Step 2 Set Alarm[1] to a small arbitrary value if the player should die.
Step 3 If dialogue isn't active: shoot bullets depending on whether or not the player is focused if the Z key is pressed. Set the appropriate alarm to a small arbitrary value. If the player has bombs remaining and the X key iz pressed, cast the appropriate spell card, set Alarm[3] and Alarm[4] to an arbitrary value, deduct a bomb.
End Step 1 Bring the player back into the play area if they've managed to get out of it while moving.