O
Oniric
Guest
Hi guys, so I'm currently working on a top/down zombie shooter and I've stumbled upon a problem. I have a shotgun which shoots 3 bullets, the problem is that let's say two of those bullets collide with 2 enemies it only affects one enemy, so basically until I kill the first enemy that was affected I cant kill the second one. Any idea why this might be happening?
if global.cur_weapon == 2
{
new_bullet = instance_create_depth(x,y,10,global.weapon_array[global.cur_weapon,2])
new_bullet2 = instance_create_depth(x,y,10,global.weapon_array[global.cur_weapon,2])
new_bullet2.direction += 20
new_bullet3 = instance_create_depth(x,y,10,global.weapon_array[global.cur_weapon,2])
new_bullet3.direction -= 20
}
This is the code, global.cur_weapon == 2 (This is the shotgun)
if global.cur_weapon == 2
{
new_bullet = instance_create_depth(x,y,10,global.weapon_array[global.cur_weapon,2])
new_bullet2 = instance_create_depth(x,y,10,global.weapon_array[global.cur_weapon,2])
new_bullet2.direction += 20
new_bullet3 = instance_create_depth(x,y,10,global.weapon_array[global.cur_weapon,2])
new_bullet3.direction -= 20
}
This is the code, global.cur_weapon == 2 (This is the shotgun)