Add Score Per Second | Cookie Clicker Style

(Windows/PC)

Someone on a thread from 2014 suggested "Constrain 'score' to floor(game.time)"

When I put this on the score actor, it caused this to function as soon as I start the game. However, I only want this to activate once the player buys this upgrade. The person said that it could also be on the other actor, but that did not work when I tried it. I have used "every 1 second change attribute to game.score +1" as that seems like it should work, but it has not. I have already gotten the clicks to increase the score, so I know I have it set up properly for the score to increase.

Anyone? Thank you!

Comments

  • tatiangtatiang Member, Sous Chef, PRO, Senior Sous-Chef Posts: 11,949
    edited September 2018

    Create a boolean attribute called game.AutoScoreIncrease.

    If [upgrade is purchased]
         Change attribute game.AutoScoreIncrease to true

    If attribute game.AutoScoreIncrease is true
         Timer every 1 second
              Change attribute game.score to game.score+1

    Do not constrain the score at all because that will force the score to be a certain value rather than allowing for multiple factors to affect it.

    New to GameSalad? (FAQs)   |   Tutorials   |   Templates   |   Greenleaf Games   |   Educator & Certified GameSalad User

  • elixirynelixiryn Member Posts: 4

    Thank you!! I will try this and update.

  • elixirynelixiryn Member Posts: 4

    Thank you so much, @tatiang !
    Do you mind explaining how I can set it up to increase this rate each time the upgrade is purchased? Would I need a score/second set up and have the score increase by that amount?

  • elixirynelixiryn Member Posts: 4

    Sorry! Tested out my theory and it worked :)

    Thank you so much for your help, I truly appreciate! I scoured the internet for the solution, since it had to be specifically for GameSalad, and couldn't find it anywhere. This is a breakthrough for my game :)

    Cheers! :)

  • tatiangtatiang Member, Sous Chef, PRO, Senior Sous-Chef Posts: 11,949

    You're welcome!

    New to GameSalad? (FAQs)   |   Tutorials   |   Templates   |   Greenleaf Games   |   Educator & Certified GameSalad User

Sign In or Register to comment.