Money and score

00george

  • Posts: 161
Hi I need some help in my game I have managed to add money and score. Well sort off Im having some problems.
Question 1: I made my score so that every 0.1 seconds its goes up by how can I make it so that its stop when the dinosaur dies and go to the shop screen?

Question 2:When the score has stopped and im in the shop screen how do I make my money behaviour read what the score is and then divide it by 10?

Question 3:How do I make it so that when I go back to the main game scene it keeps the amount of money and does not reset it.

Last thing this is a picture of my behaviour the money and score are together as I dont know how to make them sepetaly

Bulletval

  • Posts: 120
Make 2 game attributes, score and money. If you can't increment the game attribute, you would set it to the behavior score when the Dino dies. Also make a behavior attribute called score increment as a number. To make the increment stop, you need a Boolean behavior attribute called something like "playing". Under created, set it to true, then put an if in the always block saying if playing = true set score increment to 0. Also put the do every .001 seconds block in the created block.

Bulletval

  • Posts: 120
Also, when the Dino dies, set the game attribute money to the game attribute score/10. The game attributes will stay the same. Set score back to 0 when you start a new game.