bullet kills all actors at once why?
i copy 20 enemies of the same on the scene, on bullet i have a rule, when collide with enemy change attribute game.killenemy to game.killenemy+1
so in the enemy i have a rule, when attribute game.killenemy=3, destroy this enemy but if i hit one emeny, then another, on the third hit all of the enemy are destroyed, what i want is to destroy one enemy when is hit 3x
so in the enemy i have a rule, when attribute game.killenemy=3, destroy this enemy but if i hit one emeny, then another, on the third hit all of the enemy are destroyed, what i want is to destroy one enemy when is hit 3x
Comments
If you want the enemies to be destroyed after 3 hits, you need to create self.attributes to track how many times they are hit.
So in the enemy actor, create a self.attribute, and call it "health", and make it 3 (integer) put a rule that says, when overlaps or collides with bullet, change self.health to self.health -1
Then put a rule, when self.health < or = to 0, destroy this actor
Then if you want to track how many enemies are killed, create a global game attribute (integer) called "EnemiesDestroyed"
Make a rule in each enemy that says when they're destroyed, to change game.enemiesdestroyed to game.enemiesdestroyed to +1 that way you can track how many enemies were destroyed, and keep a scoring system, you can change the +1 to any number, like +10, or +100, whatever you like to create a scoring system
Hope this makes sense
Let me know if you need any more help!