Creates a hitbox at (x, y) pulling from the attack data of the specified hitbox.
Argument | Type | Description |
---|---|---|
attack | :real | The attack to get the hitbox data from |
hitbox_num | :real | The index of the hitbox to get the data from |
x | :real | The x coordinate to create the hitbox at |
y | :real | The y coordinate to create the hitbox at |
Example, called from article1_update.gml:
// this article creates a hitbox (the owner's 1st Dspecial hitbox) any time it's close to its owner:
if (point_distance( x, y, owner.x, owner.y ) < 32 && cooldown_timer == 0) {
create_hitbox( AT_DSPECIAL, 1, x, y - 40 );
cooldown_timer = 60;
}