Hi there, I built a nice shooter game but I'm having some difficulties in setting 3 lives by default, subtract one after each destroy and a game over screen. Can anyone help me please? :) Thanks in advance.
Also, how do I create a new level?
spikegotti - have you checked out the tutorial section or the How Do I forum page yet? If not, you'll find most of your answers there.
http://www.scirra.com/forum/topic45416.html
https://www.scirra.com/tutorials/top
Create a global variable and set it to 3 by default. Each destroy, substract 1 to the variable.
When your variable equals zero, go to game over screen.
Thanks guys :)
I created the global variable > Life=3
On Destroy the player if health runs out, I set subtract 1 from life.
What Im having the challenge in is setting the image to display the lives available.
I have a health bar, it is working fine, but somehow I cant seem to get the life to be deducted by one on each layout reset. :(
spikegotti : Did you substract the live Before restarting or just after?
Develop games in your browser. Powerful, performant & highly capable.
Hi, I set the life to 3 on start, then set life to -1 after restart layout.
I think, on your actions, you should do:
Set lives to -1
Restart Layout
in this order, or else, the layout is restarted before, so the conditions are
Thank you very much... Its working, but I don't see the image for the life :( sorry for being such an annoying n00b :/
Thanks for the help guys, everything fixed :D