Problem with collision and life
Hello,
I have an actor with a self attribute that is "life" and the value is 30. I want that when this actor collides with a bullet to do self.life -10 and when is = 0 destroy actor. When I spawn for example every 0.2 sec. a bullet, the life go only to 20 but if I stop to spawn for a bit and then spawn it is now 10 (correct). Here is a video: I want that every bullet collide with my actor, to decrease his lives by 10.
![](https://img.youtube.com/vi/c1_IS1_Drcc/0.jpg)
Here is the simple rule:
![image](http://img441.imageshack.us/img441/1318/screenshot20121115at162.png)
Thanks
I have an actor with a self attribute that is "life" and the value is 30. I want that when this actor collides with a bullet to do self.life -10 and when is = 0 destroy actor. When I spawn for example every 0.2 sec. a bullet, the life go only to 20 but if I stop to spawn for a bit and then spawn it is now 10 (correct). Here is a video: I want that every bullet collide with my actor, to decrease his lives by 10.
![](https://img.youtube.com/vi/c1_IS1_Drcc/0.jpg)
Here is the simple rule:
![image](http://img441.imageshack.us/img441/1318/screenshot20121115at162.png)
Thanks
![:) :)](http://forums.gamesalad.com/plugins/emojiextender/emoji/twitter/smile.png)
Comments
Try placing the collide test within the projectiles and make "life" a game-level attribute.