GameMaker Touhou Engine   Home   Downloads   Documentation

_BULLET_CREATE()


A script that fires a bullet.


Returns: id of the delay cloud that's going to create the bullet. (Integer)


Syntax:


_BULLET_CREATE(bx, by, angle, spd, delay_am, delay_fanim, delay_sanim, accel, max_spd, obj, sangl, spr, deff)

Arguments:


Name Value Significance
bx <integer> The X-coordinate to fire the bullet from.
by <integer> The Y-coordinate to fire the bullet from.
angle <integer(0-359)> The direction to fire the bullet in.
spd <integer> The bullet's movement speed.
delay_am <real> The delay before firing the bullet (accepts negative values).
delay_fanim <sprite> The appearing animation of the delay cloud.
delay_sanim <sprite> The disappearing animation of the delay cloud.
accel <real> The bullet's acceleration.
max_spd <integer> The bullet's maximum/minimum movement speed.
obj* <object> The bullet to fire. (Must inherit from _ENEMY_BULLET_PARENT or the bomb immune version of it)
sangl <boolean> true: The bullet's sprite will rotate to match it's direction of movement. false: The bullet's sprite will not rotate regardless of movement direction.
spr** <sprite> The bullet's sprite.
deff** <sprite> The sprite of the particle to create when the bullet is destroyed.

*Can be set to noone for the script to create an instance of _ENEMY_BULLET_PARENT instead.

**Can be set to noone for the script to ignore them.


Actions:


Create an instance of _DELAY_CLOUD_PARENT at the given position, set it's animations and image speed according to the given sprites and delay_am. Tell it to create the bullet with the given parameters once it's first animation ends.