How can I make a x2 powerup?

developer6810developer6810 Member Posts: 139
edited July 2012 in Working with GS (Mac)
On my game, I have a score that increases every second as well as some items you can get that increase the score. I want to make a powerup that if the main actor overlaps or collides with it, the score from then on (for both the increasing every second and the items you get) for 10 seconds gets times 2. How would you do that?

Best Answer

  • Braydon_SFXBraydon_SFX Posts: 9,273
    Accepted Answer
    You would probably make a boolean attribute and set it to false. Call it x2, or something.

    Then, when you get that power-up, change it to true.
    Then, create a rule:

    When attribute game.x2 is true,

    Now, you'll have to duplicate all of your adding score rules and put them in the rule above.

    Now, just multiple everything by two.

    So if your getting 10 points every second, in the x2 rule, change it to 20 points every second etc.

    Then, after 10 seconds, change x2 to false.

    You get the idea...

Answers

Sign In or Register to comment.