Im not sure how to explain this to make the most sense,
I have a text box in my scene that shows a number, I would like to add 1 to that number every second, after a button has been pressed and it should continue to add 1 to that number, however if the button is pressed again, it should add 2 per second and then 3 per second ect
This is for an idle clicker, I am trying to learn visual scripting and make a small game at the same time
Very basic, nothing like all the fancy games on the play store, I just want to do something basic so that I can understand how everything behind the scenes work
You can use a custom trigger (coroutine) with a wait command. Have a variable that stores how much they should be getting each second, change that every time the button is pressed.
Im sorry @munchmo I only just saw your reply, in the mean time ive been messing around and came up with this, it is working exactly as I wanted it to work
Once you have clicked and accumulated enough coins to purchase the per second upgrade, then it adds 1 coin per second and if you upgrade it again, 2 coins per second ect
No idea if this is even the correct way of doing it but so far im happy
I will look into this “custom trigger (coroutine) with a wait command” as I have no idea what that exactly means
That is definitely one way of doing it, although that will probably end up with you earning fractions of coins per frame instead of earning a set number of coins per time period. It should work out to the same amount over time either way though.