Lil' problem with Enemy flashing

SoMalFra

Member
So, I've got a little problem. I made it so that, when my Bullet object collides with the Enemy, the enemy's object flashes in white. The code is quite simple and small. The problem is that, on the first shot, the enemy doensn't go back to his normal state, and keeps white. It's solved on the second shot. The problem doensn't occur later. What should I do?
code:

[COLLISION WITH oBullet]
GML:
i**** = true
alarm[1] = 1;
CREATE EVENT
i**** = false;

alarm[1]
i**** = false;

DRAW EVENT
Code:
if !(i****) draw_self()

else

if (i****)
{
    gpu_set_fog(true,c_white, 0, 0);
    draw_self();
    gpu_set_fog(false,c_white, 0, 0);
}

Thanks to anyone that waste their time to help me!
 
Top