toggle menu
Categories
Discussions
Dashboard
Sign In
·
Register
Sign In
·
Register
Categories
Discussions
Dashboard
Sign In
·
Register
×
Home
›
GameSalad 101
›
Working with GS (Mac)
Life force ends reset game
ninja23666
Member
Posts:
7
June 2011
edited November -1
in
Working with GS (Mac)
I want to tell my game that when the life force is gone to end the game and put it on a different screen?
Comments
BrynjeBamsen
Member
Posts:
188
June 2011
Game.life = 0
change scene
ninja23666
Member
Posts:
7
June 2011
ok but what do i use to tell it to do that
BrynjeBamsen
Member
Posts:
188
June 2011
you might have to elaborate if you want an exact solution.
but here goes nothing
Create a integer game attribute called life Set it what ever you want life force to be.
now this is where you have to be more specific. How would you like to reduce your life force. By time, By damage, etc etc etc...
f.ex If player collides or overlaps with enemy
Change attribute game.life to game.life -1
Then make another rule saying
IF game.life = 0
Change scene
Cant really help until you specify your thoughts a bit more
Sign In
or
Register
to comment.
Comments
change scene
but here goes nothing
Create a integer game attribute called life Set it what ever you want life force to be.
now this is where you have to be more specific. How would you like to reduce your life force. By time, By damage, etc etc etc...
f.ex If player collides or overlaps with enemy
Change attribute game.life to game.life -1
Then make another rule saying
IF game.life = 0
Change scene
Cant really help until you specify your thoughts a bit more