S
samyak
Guest
I might be missing something here, but it's not working. Here the calling instance shoots a bullet when the enemy is in collision with the given rectangle. If I do 'col= noone' instead of 'col!=noone', the bullet is shot normally.
Code:
shootcount= clamp(shootcount,-6,120); shootcount++;
x2= x+lengthdir_x(270,image_angle+90);
y2= y+lengthdir_y(270,image_angle+90);
col= collision_rectangle(x-sprite_width/2,y2,x+sprite_width/2,y,b_common,false,true);
if col !=noone and shootcount>=121 and spd=0 and global.pause=-1 and state=0
{
instance_create_layer(x,y,l2,w_bullet);
shootcount=-1;
}