# Lives

**URL:** <https://forum.kirupa.com/t/lives/117236>\
**Category:** Uncategorized\
**Created:** [July 26, 2004, 2:47am UTC](https://forum.kirupa.com/t/lives/117236 "2004-07-26T02:47:05Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![TheOneAndOnly](https://avatars.discourse-cdn.com/v4/letter/t/3bc359/32.png) [@TheOneAndOnly](https://forum.kirupa.com/u/TheOneAndOnly)\
**Post date:** [July 26, 2004, 2:47am UTC](https://forum.kirupa.com/t/lives/117236/1 "2004-07-26T02:47:05Z")

</div>

Hello Fellow Kirupians! Yet another qusetion from me! TheOneAndOnly!

Ok, so here is the deal…I have this game im making, its like an asteroids clone…Anyways, i want to make it so when an asteroid hits you, you lose a life (which i did) BUT when it hits you it doesnt just take 1 life away it takes like 20 a second, so how do i make it when the asteroid hits, it takes only 1 life away?

here is the code im using now

onClipEvent (enterFrame) {  
if (this.hitTest(\_root.asteroid)) {  
\_root.lives -= 1;  
}  
}

---

<div class="post-metadata">

**Author:** ![elPooter](https://avatars.discourse-cdn.com/v4/letter/e/839c29/32.png) [@elPooter](https://forum.kirupa.com/u/elPooter)\
**Post date:** [July 26, 2004, 3:00am UTC](https://forum.kirupa.com/t/lives/117236/2 "2004-07-26T03:00:47Z")

</div>

I have a suggestion, try making a sequence for the space ship called “damaged”. in that sequence, create three frames and select the middle one. Then open the actions panel and type \_root.lives -= 1; here is an fla of what I mean:

---

<div class="post-metadata">

**Author:** ![TheOneAndOnly](https://avatars.discourse-cdn.com/v4/letter/t/3bc359/32.png) [@TheOneAndOnly](https://forum.kirupa.com/u/TheOneAndOnly)\
**Post date:** [July 26, 2004, 4:04am UTC](https://forum.kirupa.com/t/lives/117236/3 "2004-07-26T04:04:57Z")

</div>

thank you so much elPooter! 😃

---

<div class="post-metadata">

**Author:** ![elPooter](https://avatars.discourse-cdn.com/v4/letter/e/839c29/32.png) [@elPooter](https://forum.kirupa.com/u/elPooter)\
**Post date:** [July 26, 2004, 3:09pm UTC](https://forum.kirupa.com/t/lives/117236/4 "2004-07-26T15:09:55Z")

</div>

No problem :).
