I see the enemy "attacking" the player, but I don't see the player attacking. I'm guessing your issue with the player attacking is you're referencing the enemy by its object index and not by its actual id.
Also, your Create Event says dmg=5 but your collision code says Zenta.hp-attackdmg, so I'm guessing attackdmg was defaulted to 0 in the parent.
Since this enemy is a child of obj_enemy, obj_enemy (that works) takes damage by a collision event in a obj_hitbox object. The code is this:
Code:
if (instance_exists(obj_enemy))
hp = (obj_enemy.hp - obj_enemy.dmg)
How would I fix it to call for it's actual id? I have another enemy that doesn't fall off ledges that is a child of obj_enemy too and it works, attacking and all. It's just this one object.
In the obj_enemy, it also has simular collision code with the hitbox but the enemy gets pushed back.:
Code:
if (instance_exists(obj_hitbox))
hp = (hp - dmg)
vspd = -3;
hspd = -25;
As for the attackdmg, I changed dmg to attackdmg, but the parent's attack damage when inherited is not 0: it's attackdmg = 10;