onjai_x3
Member
Hello all! I'm making a 2d platformer-esque/arena type game that is, in hindsight, kind of similar to Towerfall Acsension. But instead of bow and arrows, the character is using a melee attacks.
I can't for the life of me figure out how to get the spawning enemies to get knocked back after getting hit by my hitbox. I'm trying to make the enemies get destroyed after
1. being knocked into solid objects
2. one or two seconds after being hit by the hitbox, so that they'll be destroyed eventually if they don't collide with any solid objects
So far, I just have this place holder code below. All it does is destroy the enemy when they hit the hitbox.
location: objects > hitbox > end step > script
with (obEnemy1) {
// kill enemy
if (!(bbox_left > other.bboxright || bbox_right < other.bboxleft || bbox_top > other.bboxbottom || bbox_bottom < other.bboxtop)) {
instance_destroy();
Any ideas on how to modify this?
I can't for the life of me figure out how to get the spawning enemies to get knocked back after getting hit by my hitbox. I'm trying to make the enemies get destroyed after
1. being knocked into solid objects
2. one or two seconds after being hit by the hitbox, so that they'll be destroyed eventually if they don't collide with any solid objects
So far, I just have this place holder code below. All it does is destroy the enemy when they hit the hitbox.
location: objects > hitbox > end step > script
with (obEnemy1) {
// kill enemy
if (!(bbox_left > other.bboxright || bbox_right < other.bboxleft || bbox_top > other.bboxbottom || bbox_bottom < other.bboxtop)) {
instance_destroy();
Any ideas on how to modify this?