Page 1 of 1

How do I reset a value? (example: coins) (SOLVED)

Posted: Tue Nov 07, 2017 7:17 am
by MichiPantera
I have a 'coins' system in my game. And at some point the character is robbed and lose all her money.
How do I reset the value 'coins' back to zero/to the initial value (0)?

thanks! :D

Re: How do I reset a value? (example: coins)

Posted: Tue Nov 07, 2017 7:36 am
by Divona
Depending on the system, but you could just set the variable to zero.

Code: Select all

    $ coins = 0

Re: How do I reset a value? (example: coins)

Posted: Tue Nov 07, 2017 7:55 am
by MichiPantera
It works!
Thank you so much Divona!!