Hi! I am having a problem. If I create a scene variable “enemylife” is set to 50 and if “bullet” is collide with “enemy” it subtracts to 1. If the player hits the enemy for 50th time. I want to delete the enemy. But I have a set spawn timer for enemy if the enemy was deleted it won’t spawn anymore. can you please help me?
I want to delete that only one enemy that collide with bullet. but it deletes all the enemy and won’t spawn any enemies anymore. please help.
do a collison with bullet and enemy (condition) in the delete enemy event
but the enemy will be deleted immediately. Enemy variable life is useless. I want the enemy to have its own life count so that player can hit it many times and then die.
keep the life = 0 to
then it wont
what do you mean? please explain thank you so much
hmm do if life = 1 instead of 0
Hi, your enemy isn’t spawning again because your last event occurs multiple times since EnemyLife is not reset to 50.
Either set EnemyLife to 50 at last event or put Trigger Once condition
ooo i thought the problem was the killing enemy not spawning i thought the killing would kill all of them hmmm
how? please cat help me. edit the picture above thank you huhu
it kills all of them then it prevents spawning huhu
I can’t edit pictures right now…
On your second last event with “In the beginning of scene” condition, it sets enemy life to 50.
Copy and paste that inside your “EnemyLife = 0” condition’s event.
Also, if you don’t want to delete all enemy when they die, use Object Variable instead, it’s just like a Scene Variable but it’s specific to each Enemy
yey thank you it works! but there’s another problem. I still deletes all the enemies in the scene. but they spawn again. thank you
If you don’t want to delete all enemies at once, choose object variable instead. When you add an action there is “Modify the variable of an object” rather than “Modify scene variable” - pick object variable, then pick enemy object.
Do you mean they spawn correctly or not correctly?