B
Bengs
Guest
So ive made a character and a hitbox and then put in collission code between my hitbox and my enemy but it appears i made a mistake. Can anyone help me?
My attack code is
and then in the obj_hitbox it's collission code with the enemy this code
In my character create code i put
In my enemy create code i put
I also put this in my enemy step code
My attack code is
Code:
hsp = 0;
x = x + hsp;
image_speed = 2;
sprite_index = Spr_CharacterAttack01Right;
instance_create_layer(x,y,Obj_Character,Obj_CharacterAttack01RightHitbox);
if (image_index > image_number - 1){
attack = 0;
}
Code:
with other{
Ehp -= Obj_Character.Cdmg;
}
instance_destroy(Obj_CharacterAttack01RightHitbox)
Code:
Cdmg= 50;
Code:
Ehp = 100;
Code:
if Ehp <= 0 {
instance_destroy()
}