Help with lives
Pineapple_King
Member Posts: 16
Hey all, this is my first post in this particular forum, i just started using gs and i am working my way up designing a pachinko board. (we all got to start from somewhere :P)
My problem is this:
Every time i click the mouse button i spawn an actor (ball).
I want to use a limited number of spawns (ex. 10)
i am representing these limited spawns as lives on the top left corner (10 small hearts lets say)
Every time a spawn/mouse click occurs you are supposed to lose a life.
I want that one by one the hearts disappear, as if the player is losing a life after each click.
Help me create this rule please, I only wish i made myself clear enough...
thanks, keep it up
PK
My problem is this:
Every time i click the mouse button i spawn an actor (ball).
I want to use a limited number of spawns (ex. 10)
i am representing these limited spawns as lives on the top left corner (10 small hearts lets say)
Every time a spawn/mouse click occurs you are supposed to lose a life.
I want that one by one the hearts disappear, as if the player is losing a life after each click.
Help me create this rule please, I only wish i made myself clear enough...
thanks, keep it up
PK
Comments
in the button you click that spawns the ball:
rule when touch is pressed AND (ALL)
when game.lives > 0
change attribute game.lives to game.lives-1
Spawn ball actor
in the heart actor use replicate and just put in game.lives for the number of replications
Then put in this on button actor
Rule:
Touch is pressed
attribute lives is >0
Change attribute lives -1
Cheers, Weswog
Cheers