Hi,
I'm trying to get rid of a character when i kill him. I'm having several issues.
I place this code within rep_ex section of the global script. So it repeatedly check whether it's true.
Code: ags
Generally it's the adding to the variable thats the problem. is there a way to disable a character all together or possibly a way to only run a part inside that if statement once?
I'm trying to get rid of a character when i kill him. I'm having several issues.
I place this code within rep_ex section of the global script. So it repeatedly check whether it's true.
if(EnemyHealth[1] < 1) // if the enemy's health is 0 or less.
{
KillCount += 1; // Add 1 to killcount interger variable. This part causes problems since when enemy is dead it just
//adds one every game loop since the condition is true. I only want this to happen once. :(
cStitches.LockView(3); // Changes view to a blob of blood
cStitches.StopMoving(); // Make the enemy stop following the character.
}
Generally it's the adding to the variable thats the problem. is there a way to disable a character all together or possibly a way to only run a part inside that if statement once?