Twine Version: Twine 1.x
Story Format: Sugarcube2
Hi, this is my first post so appologies if I do something stoopid.
I’m trying to make a ranking system for a game I’m working on.
Say for instance, we have 4 contestants, one of which is the player character who we can say is P4 (my game will have more if that matters).
P1 scores 30pts
P2 scores 35pts
P3 scores 40pts
P4 scores 40pts
I need to work out their positions and any ties.
I thought I could start with something like:
<<if $p1pts gte $p2pts and $p1pts gte $p3pts and $p1pts gte $p4pts>><<set $p1rank = 1>><<set $rank1 = $rank1 + 1>><</if>>
Which finds if anyone beat p1, if true then sets p1 as rank 1 and adds 1 to the number of players at rank 1.
I can then do the same for the other players to see if anyone else is in joint 1st place…
…but then (if not before) I get lost.
Please help!