GameMaker Touhou Engine   Home   Downloads   Documentation


A script that spawns a stage enemy or boss.

Returns: id of the created enemy. (Integer)


_ENEMY_CREATE(obj, ex, ey, hp, items, set_alarm, path, pspd, pend, pabs)


Name Value Significance
obj <object> The enemy to create. (Must inherit from _ENEMY_PARENT or _BOSS_PARENT)
ex <integer> The X-coordinate to create the enemy at.
ey <integer> The Y-coordinate to create the enemy at.
hp <integer> The enemy's health.
items <object array> The items the enemy is set to create upon being destroyed.
set_alarm* <integer> The amount of steps to set the Alarm[0] of the enemy to.
path** <path> The path that the enemy should follow.
pspd** <integer> The enemy's movement speed along the path.
pend** <path_endaction> The action to perform at the end of the path (view YoYoGames docs for more info).
pabs** <boolean> true: The path is taken from a position independent of the enemy's. false: The path is taken from a position relative to the enemy.

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

**Ignored if any of the path arguments are set to noone.


Create an instance of the given enemy at the given position with the given parameters.