Cookies
#5

Just divide the distance by 1000 and round it down to an integer value. That will give the number of cookies earned.

Код:
new cookies = floatround(distance / 1000.0, floatround_floor);
If you want to reward the players while they are working, you must keep track of how many cookies they got so far. Once the amount from the calculation above is different from the stored value, give another cookie and update the variable.
Reply


Messages In This Thread
Cookies - by Despacito - 12.05.2017, 20:59
Re: Cookies - by ISmokezU - 12.05.2017, 21:19
Re: Cookies - by Despacito - 12.05.2017, 21:21
Re: Cookies - by aoky - 12.05.2017, 23:30
Re: Cookies - by NaS - 13.05.2017, 06:52
Re: Cookies - by Despacito - 13.05.2017, 09:26
Re: Cookies - by Tord - 13.05.2017, 09:50
Re: Cookies - by NaS - 13.05.2017, 11:26
Re: Cookies - by Tord - 13.05.2017, 11:28

Forum Jump:


Users browsing this thread: