Ranking system
vegasmike1
Member Posts: 192
I have a meter that keeps score, when the player ends the round, either win or loose, I want to show a RANKING based on the score.
So if Score is 500 and lower do this
If score is 1000 to 500 do then next thing
if score is 1500 to 1001 do this other thing.
When I do the simple thing it does everything as above if it is 1500 it does all the things because I do not know a way to box things in and exclude some scores, to create a ranking system.
There is probably some cool math to do this but I am not the cool math guy.
So oh cool math guy or anyone else out there, any ideas
Mike
So if Score is 500 and lower do this
If score is 1000 to 500 do then next thing
if score is 1500 to 1001 do this other thing.
When I do the simple thing it does everything as above if it is 1500 it does all the things because I do not know a way to box things in and exclude some scores, to create a ranking system.
There is probably some cool math to do this but I am not the cool math guy.
So oh cool math guy or anyone else out there, any ideas
Mike
Comments
Rule
When all conditions are valid:
game.score <= 500
-----[do something]
otherwise
-----Rule
-----When all conditions are valid:
-----game.score > 500
-----game.score <= 1000
----------[do something]
-----otherwise
----------Rule
----------When all conditions are valid:
----------game.score > 1000
---------------[do something]
This will create sort of a cascading behavior. If the first condition is met, it will stop. If it is not, the function will look into the otherwise section. There is finds another Rule. If the first condition of that Rule is met, the function will stop, etc.. etc...
It will keep going until either a condition(s) is met - or until the otherwise section is empty.
You can create extremely complex logic blocks by using this technique.
I actually talk about this in my platformer tutorials which I started a few months ago:
http://gamesalad.com/wiki/how_tos:platformer_tutorials
That might get you some better footing when creating complex Rule sets.
Hope this helps!
Joe