PDA

View Full Version : lives...



TheOneAndOnly
July 25th, 2004, 11:47 PM
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;
}
}

elPooter
July 26th, 2004, 12:00 AM
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:

TheOneAndOnly
July 26th, 2004, 01:04 AM
thank you so much elPooter! :D

elPooter
July 26th, 2004, 12:09 PM
No problem :).