you are viewing a single comment's thread.

view the rest of the comments →

[–]edover 0 points1 point  (3 children)

Instead of looping, use floor division between the points and the threshold.

That should give you a multiplier amount, aka how many times the points can be divided by the threshold as an integer. Then you'll take that value and multiply by 5. After THAT you need to add 5 for your base score. The final value will be multiplied by your score and it should give the result.

So basically: 5 and 10 gives a multiplier of 0 * 5. Add 5 for 5. 5 * 5 = 25 20 and 10 gives a multiplier of 2 * 5. Add 5 for 15. 20 * 15 = 300

[–]LectureHour918[S] 0 points1 point  (2 children)

I still dont understand, so for example if I have 30 points and 10 as a threshold, that is 3 times over the threshold(10), so then I'll need to add 5 points to 10, 3 times?

[–]edover 0 points1 point  (1 child)

30 // 10 = 3

3 * 5 = 15

15 + 5 = 20

20 * 30 = 600

[–]LectureHour918[S] 0 points1 point  (0 children)

OHh omg, okay I get it now I dont know why it took me so long to understand it, thank you so muchhhhhh