FoufaDjo
Member
so am trying to make a fast bullet collision for my game but i have problem with targiting the enemy object sometimes i i think its becaue that the event_preform start sometimes when the enemy object is destroyed so the collision event cant find the enemy id if you guys have any idea to how to fix this pleas let me know
The bulletEndStep Event :
if hit = 0 && collision_line(xprevious,yprevious,x,y,obj_enemy,1,0){
event_perform(ev_collision,obj_enemy);
}
The Bullet Collision Event With The Enemy :
if other.life = 0{
other.hp -= dmg;
hit = 1;
}
The bulletEndStep Event :
if hit = 0 && collision_line(xprevious,yprevious,x,y,obj_enemy,1,0){
event_perform(ev_collision,obj_enemy);
}
The Bullet Collision Event With The Enemy :
if other.life = 0{
other.hp -= dmg;
hit = 1;
}