How do make it so that when you shoot a sprite he doesn't dissappear on the first hit but instead on the second or third hit depending on how tough I want the sprite to be. Do you somehow give them health or does it have something to do with the shooting script?
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
I know this question was posted in 2005, but i thought i'd add an answer so that others would know how...
*Create an items called ENEMY'S HEALTH.
*create a function that will subtract -1 ENEMEYS HEALTH when needed.(this function, when depleted will delete sprite ENEMY)
*Create a collision between your BULLET and the ENEMY that triggers -1 ENEMYS HEALTH.
when you shoot your enemy, it will subtract -1 ENEMYS HEALTH. And when all of the the item named ENEMY'S HEALTH is gone, the enemy sprite will be deleted.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
How do make it so that when you shoot a sprite he doesn't dissappear on the first hit but instead on the second or third hit depending on how tough I want the sprite to be. Do you somehow give them health or does it have something to do with the shooting script?
This has been discussed already in other threads. Look around, also on the EZBoard forum. I'm sure you'll find something.
A general overview of how to do it is: Use lots and lots of invisible inventory items and sprite collisions.
I know this question was posted in 2005, but i thought i'd add an answer so that others would know how...
*Create an items called ENEMY'S HEALTH.
*create a function that will subtract -1 ENEMEYS HEALTH when needed.(this function, when depleted will delete sprite ENEMY)
*Create a collision between your BULLET and the ENEMY that triggers -1 ENEMYS HEALTH.
when you shoot your enemy, it will subtract -1 ENEMYS HEALTH. And when all of the the item named ENEMY'S HEALTH is gone, the enemy sprite will be deleted.