How do you set up a “Knockback” event in GD5? I thought I understood how to complete this, but it
doesn’t seem to work.
With my current setup, my hero does get knocked back, but keeps getting knocked back, even after it should stop being moved/you continue pushing forward.
For reference: I have a Hero_1 sprite and a hidden Hero_1_Hitbox for movement. Here’s my current method
Condition: Enemies is in collision with Hero_1_Hitbox Variable InvulnHit of Hero_1 = 0 Event: Do = 1 to Variable InvulnHit of Hero_1 Condition: InvulnHit of Hero_1 = 1 Event: Reset the timer "Knockback" of Hero_1_Hitbox Add to Hero_1_Hitbox an instant force, angle: 220 degrees and length: 200 pixels Condition: The Timer "Knockback" of Hero_1_Hitbox is greater than 0.3 seconds Event: Stop object Hero_1_Hitbox Pause Timer "Knockback" of Hero_1_Hitbox Do = 0 to variable InvulnHit of Hero_1
Here’s a screenshot of what I have above in GD5 itself:
Any/all input is greatly appreciated.