get_hitstop_formula

Returns the resulting amount of hitpause a player would get if they were hit with the specified stats. Note that hitpause is not hitstun; hitpause is the freezeframes immediately after getting hit.

ArgumentTypeDescription
player damage:realThe current damage of the target before being hit
hitbox damage:realThe amount of damage the hitbox deals
hitbox base hitstop:realThe base hitpause the hitbox always deals
hitbox hitstop scale:realThe amount hitpause scales with damage
hitbox extra hitpause:realThe extra hitpause only dealt to the target

Example, called from article1_hit.gml:

// This simulates hitpause in an article as if it were a player, to be used elsewhere:
hitstop = get_hitstop_formula(damage, enemy_hitboxID.damage, enemy_hitboxID.hitpause, enemy_hitboxID.hitpause_growth, enemy_hitboxID.extra_hitpause);