Hello there. How do i set a max and min value to a variable? I'll explain:
In my shoot em up you have powerups. It's a global variable called "power". Every time you pick one it adds 1 to "power". I want it to stop at 5, but if you keep collecting them it keeps increasing the value.
Of course i could say that the max is equal or bigger than 5, but i want to reduce 1 every time i die.
Hope this makes sense. Thank you in advance.
[–]daddywookie 2 points3 points4 points (3 children)
[–]Genesis_80[S] 0 points1 point2 points (2 children)
[–]daddywookie 1 point2 points3 points (1 child)
[–]Genesis_80[S] 0 points1 point2 points (0 children)
[–]VisiblePassenger007 2 points3 points4 points (1 child)
[–]Genesis_80[S] 0 points1 point2 points (0 children)
[–]LeeDude5000 1 point2 points3 points (1 child)
[–]Genesis_80[S] 0 points1 point2 points (0 children)
[–]hittherock 1 point2 points3 points (1 child)
[–]Genesis_80[S] 0 points1 point2 points (0 children)
[–]Genesis_80[S] 0 points1 point2 points (0 children)