From the guy who helped you last time:
Make a variable called "lives".
When he's touching a bad thing (enemy laser, explosion, etc.) make the lives variable go down by 1 (change lives by -1)
When it equals 0 (or is less than 1, in case the variable goes negative), make the ship hide.
Tadaa!
Offline
Is "set lives to 10" inside the forever block? Put it above it, but not in it. Else it will continuously reset to 10.
Offline
Here: plug these in:
Tell me if that works.
Offline
nonpowner wrote:
Yes, that works thanks But one more thing, I think if you remember the other post, I had 2 lazers that always are on the player, How Do I get them to dissapear when My player has dissapeared?
Add this before the laser script:
if lives > 0
So it would be
< forever>
If (fire button) pressed AND if lives > 0
run laser script
</if>
</forever>
and if your laser script doesn't use the "hide" or "show" blocks, use this:
< forever>
If lives < 1
hide
</if>
</forever>
Last edited by Kileymeister (2010-12-11 16:44:44)
Offline
Could you do another picture code thing? On both my lazers I have this
WHen I revive shoot
[Reapeat untill Touching edge
[Point in direction 0
[move 10 steps
Hide
[forever
[Goto sprite 1 (player)
[Show
So were should I put the code That makes the lazers Dissapear?
Offline