Stencyl 3.4.0 is now out. Get it now!

Attribute wont continue increasing on scene change

TyJayLo

  • Posts: 11
do something like this in a scene created event. this will happen every 1 second.. i used it for time..  every 1 second it will add 1 to the timer for score att.... in the next scene you will set the money attribute when created to the money attribute from last scene with the money getter.. and do another every 1 second event in that scene as well
I'm still new to this so I really don't get what you did with the "If reward video watched" statement, how does the game know when the video was watched?

squeeb

  • Posts: 1079
wrap the 'do every second' time event in a boolean attribute that gets set to true when you buy the item that increases the currency per second?
Disregard the reward video name.. do a Boolean Check like that one.. name it anything you'd like.... set it to true whenever the user buys the item to increase the money.. if it's false then it won't increase every second

TyJayLo

  • Posts: 11
wrap the 'do every second' time event in a boolean attribute that gets set to true when you buy the item that increases the currency per second?
Disregard the reward video name.. do a Boolean Check like that one.. name it anything you'd like.... set it to true whenever the user buys the item to increase the money.. if it's false then it won't increase every second
When I do that my money goes up too fast and my money per second wont stop increasing.


TyJayLo

  • Posts: 11
Let's see the code?
Never mind, I fixed it, but I also want to be able to buy it multiple times and have my money per second increase everytime I do it.

TyJayLo

  • Posts: 11
How do I get it so that I can upgrade it

squeeb

  • Posts: 1079
Sorry.. I keep forgetting to check here.. you have it increasing?   You want to buy more than once and increase it more?
When they buy the money, you can make it go up more each time they press the button and can buy.. you have that part.. by adding more to the attribute.. or multiplying it each time you can increase it.. not sure how much you want to increase it by... so make another purple attribute... and that will be like the money factor.... change this attribute when they buy also.. and when you set the other attribute place this one ont here also.. either adding or multiplying it..