Created
May 24, 2018 07:44
-
-
Save teukstrid/2422d72d256df43da351efebcbe5e4e7 to your computer and use it in GitHub Desktop.
o_player_collision_with_hitbox
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/// @description Hit logic | |
if hurtbox_entity_can_be_hurt_by(other) | |
{ | |
invincible_ = true; | |
alarm[0] = global.one_second *0.75; | |
global.player_health -= other.damage; | |
var _direction = point_direction(other.x, other.y, x, y); | |
set_movement(_direction, other.knockback_); | |
state_ = player.hit; | |
event_user(state_); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment