How can I make a x2 powerup?
![developer6810](http://forums.gamesalad.com/applications/dashboard/design/images/defaulticon.png)
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_SFX Posts: 9,273
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...My GameSalad Academy Courses! ◦ Check out my quality templates! ◦ Add me on Skype: braydon_sfx
Answers
If I did it that way by just adding the new rules, wouldn't the old adding rules and the new ones overlap and you would get like 3x the amount of points?
My GameSalad Academy Courses! ◦ Check out my quality templates! ◦ Add me on Skype: braydon_sfx
I got it to work, but after the 10 seconds are over, the x2 keeps going, although I made sure there was a rule with a timer: after 10 seconds change attribute x2 on to false. Any ideas?
Yeah, for some reason, the boolean attribute is not changing back to false...
My GameSalad Academy Courses! ◦ Check out my quality templates! ◦ Add me on Skype: braydon_sfx