Multiplying the Score
eligames
Member, PRO Posts: 40
I am trying to make it where when a ball hits the pad then you get one point. I have that but i want to use my spawn button that I have and when a second ball enters then the score is multiplied by 2 and when 3 balls are in its multiplied by 3 etc... The balls are not going to be destroyed either they will be all bouncing around getting 2,3,4 etc... points every time.
Comments
Inside your spawner actor:
Change Attribute game.multiplier to game.multiplier+1
Spawn ball
Inside your pad actor:
Change Attribute game.score to game.score + game.pointsPerBall * game.multiplier
New to GameSalad? (FAQs) | Tutorials | Templates | Greenleaf Games | Educator & Certified GameSalad User
How do I make the game.pointsPerBall attribute and where do I put it?
You probably want to leave the value of game.multiplier at 0 to begin with but I just gave an example of how to change its default value.
New to GameSalad? (FAQs) | Tutorials | Templates | Greenleaf Games | Educator & Certified GameSalad User
thank you
I'm still having a problem, it increases my score even when I touch the spawn button how do I get rid of that?
I don't know without seeing how you have your rules set up.
New to GameSalad? (FAQs) | Tutorials | Templates | Greenleaf Games | Educator & Certified GameSalad User