- Code: Select all
spd+=min(0, max(spd, 5));
and
- Code: Select all
spd+=min(1, max(0, 5));
I can't quite figure it out. I learned it a while back, but forgot it as time passed
spd+=min(0, max(spd, 5));
spd+=min(1, max(0, 5));
spd = min(spd + 0.5, 5);//Replace 0.5 with the speed that you want it to increase
Users browsing this forum: No registered users and 1 guest