GameMaker Touhou Engine   Home   Downloads   Documentation

_LASER_GENERATOR_PARENT_S


The object that serves as a sort of delay cloud for anchored/stationary lasers but also handles some of their logic.


Locals:


Name Type Significance
_CREATED_LASER Reference to Object The laser object that the generator should create.
_CREATED_LASER_SPRITE Reference to Sprite The sprite of the laser that should be created.
_CREATED_LASER_ANGLE Integer The rotation of the laser that should be created.
_CREATED_LASER_DEATH_EFF Reference to Sprite The sprite to create a particle out of when the created laser gets destroyed.
_CREATED_LASER_ID Reference to Object Stores the id of the laser that should be created, after it's been created.
_FIRST_ANIMATION Reference to Sprite The appearing animation of the delay cloud. This animation will stay on it's last frame until the laser disappears.
_SECOND_ANIMATION Reference to Sprite The disappearing animation of the delay cloud.
_CREATED_LASER_DURATION Non-negative Integer The amount of time it takes for the laser to disappear once it's been created.
_APPEARING_PARTICLE Reference to Object The particle object which is used to display the appearing animation of the laser.
_ATTACHED Reference to Object If not noone, the laser will attach itself to this object, following it as as long as it can.

Events:


Trigger # Actions
Create 1 Declare local variables.
Alarm 0 1 Start animating the appearing particle, and set Alarm 1 to go off after that animation ends.
Alarm 1 1 Create the laser and set Alarm 2 to go off when the laser is supposed to disappear.
Alarm 2 1 Destroy the laser and start disappearing.
Step 1 Correct own position according to _ATTACHED, then correct the position of the particle and laser according to itself.
Animation End 1 If appearing, freeze own animation on the last frame. If it's disappearing, destroy self.