Legacy GM double collision (SOLVED)

Y

Yvalson

Guest
Every enemy in my game has a hitbox (this is an different object as the hitbox is different from the actuall mask_index of the enemy) but when I inflict damage this goes to every enemy in the room.
here is the code

Player object

///Hitbox
if(Is_Attacking = 1){
if(image_index >= 7 && image_index <= 9 && Can_Hit){
Can_Hit = 0
with(instance_create(x, y, Obj_Hitbox)){
with(instance_place(x, y, Obj_Mognorian1_Hitbox)){
with(Obj_Mognorian1){
Getting_Hit = 1
}
}
}
}
}

enemy object
create event

h = instance_create(x, y, Obj_Mognorian1_Hitbox)

if I change

with(instance_place(x, y, Obj_Mognorian1_Hitbox)){

too

with(instance_place(x, y, Obj_Mognorian1.h)){

nothing happens
 
Top