Axl Trauts
Member
Hi,
I have a Boss object, which when hit, starts to flash (like a Megaman boss) and while it's flashing is immune to damage. The immune flag state is "boss_inmune = 1".
All weapon ammunition objects check collisions on the Step event using a script. That script check if the "Enemy" objects have the "boss_inmune" flag and if its set to 0, to deal damage, or 1 to exit the script.
The thing is I want the flash animation to run for 1 second before losing the immune state and receive damage again. The problem happens here:
Boss object Step event when receiving damage and setting immunity
That immunity state runs before the weapon Step event, or before the damage script inside the weapon Step event. As this flashing is specific to this boss, I wouldn't like to put it on the weapon Step event. Do you have any idea how to set it correctly?
P.S.: Maybe I'll drop the flashing alarm and check for sprite animation instead.
I have a Boss object, which when hit, starts to flash (like a Megaman boss) and while it's flashing is immune to damage. The immune flag state is "boss_inmune = 1".
All weapon ammunition objects check collisions on the Step event using a script. That script check if the "Enemy" objects have the "boss_inmune" flag and if its set to 0, to deal damage, or 1 to exit the script.
The thing is I want the flash animation to run for 1 second before losing the immune state and receive damage again. The problem happens here:
Boss object Step event when receiving damage and setting immunity
GML:
var inst = instance_place(x,y,par_arma); // collision with weapon parent objects.
if(inst != noone && sprite_index != spr_boss4_tanque_blanco) //if collision happens and the sprite is not the white (blanco) flashing sprite
{ sprite_index = spr_boss4_tanque_blanco; //sets the sprite to the flashing sprite
alarma_inmune += 1; //starts the 30 second immunity alarm
//boss_inmune = 1; //sets immunity state to 1
}
P.S.: Maybe I'll drop the flashing alarm and check for sprite animation instead.
Last edited: