make a integer attribute called score and a boolean attribute called addToScore.
whenever you start the game have a change attribute behavior changing addToScore to true
make a rule when attribute addToScore is true then put a timer in that rule every 1 second then put a change attribute behavior in that timer and change attirubte score to score+1 (or however much you want to add every second)
then whenever the player dies, its game over, or you want the score to stop adding, change attirubte addToScore to false
MitchMan97 said: Hi i was wondering how i can add points for every second that my actor is alive how do i do that?
Every actor has it's own clock... the self.time attribute. One easy way to add that to the main score is to add self.time to the game.score when the main character dies or completes the level... like a bonus.
Comments
whenever you start the game have a change attribute behavior changing addToScore to true
make a rule when attribute addToScore is true
then put a timer in that rule every 1 second
then put a change attribute behavior in that timer and change attirubte score to score+1 (or however much you want to add every second)
then whenever the player dies, its game over, or you want the score to stop adding, change attirubte addToScore to false
now it goes from 0-1 like its supposed to but it doesn't keep going?