Hey, would you mind sharing the source code?
I am interested in how you did the death animations!
Viewing post in Cactus y Opuntia jam comments
I added our game public repo to the submission, you should be able to view it, if any problems occur - PM us! :D
Death animations are simple. We just made some animations of cacti exploding, and then forced Animated Sprite to play them, when enemy health drops to 0:
func attacked(damage, knockback_dir = 0): health -= damage if health <= 0: #sum other code is_dead = true $AnimatedSprite.play("Death")
It goes the same for Terrorist. Runner, on the other hand, changes his rotation and velocity to simulate tripping over:
func _physics_process(delta): #runner mechanics if is_dead && rotation_degrees < 90: #if runner is dead, and hasn't hit the ground yet, make him rotate speed = 30 rotation_degrees += 5 if rotation_degrees >= 90: #make runner move slower as he trips over if velocity.x > 0: velocity.x -= 1 else: velocity.x += 1 func attacked(damage, knockback_dir = 0): health -= damage if health <= 0: is_dead = true $AnimatedSprite.play("Death")
The Boss just disables his collision, since he doesn't have any death animation:
func attacked(damage, knockback_dir = 0): health -= damage if health <= 0: is_dead = true set_collision_mask(0)