playMaker

Author Topic: Multiply the score[SOLVED]  (Read 1937 times)

Rabagast

  • Hero Member
  • *****
  • Posts: 683
    • Homepage
Multiply the score[SOLVED]
« on: July 14, 2014, 06:59:38 PM »
Hi!

When I pick up one coin, I get 1 point. The next coin give me 2 point, and then 4 point, 8, points, 16 points, etc. Understand? So it double the score every time I pick up a new coin, but if I miss one coin, I need to start over again. Any ideas how I can do this?
« Last Edit: July 18, 2014, 08:28:04 AM by jeanfabre »
Check out our homepage. http://www.walsberg.no
Or my personal game blog for news about my games. http://retro-tetro.walsberg.no

jeanfabre

  • Administrator
  • Hero Member
  • *****
  • Posts: 15500
  • Official Playmaker Support
Re: Multiply the score
« Reply #1 on: July 16, 2014, 09:30:36 AM »
Hi,

How do you know the user missed a coin?

 Bye,

 Jean

Rabagast

  • Hero Member
  • *****
  • Posts: 683
    • Homepage
Re: Multiply the score
« Reply #2 on: July 16, 2014, 09:48:47 AM »
Hi, Jean!

I use a trigger. But I made it.

This is what I did:

As you can see in the Screenshot, every time I pick up a coin, I add one to an Int Variable I call "Double The Score" And then I use this variable to add to the score.
If I miss one coin, I have a trigger right behind the player, so if a coin collide with this trigger, It reset the variable "Double The Score" back to 1. And it start over again. :-)

Check out our homepage. http://www.walsberg.no
Or my personal game blog for news about my games. http://retro-tetro.walsberg.no