The rivals
The car ahead and the car behind, in your class: their number, their name, the gap, how it moves, their last lap.
- 15 min
- no game needed
- at the end: a block built twice
On the right, two tiles for the two cars that matter: the one you are chasing, the one chasing you, in your class. Start from your dash from chapter 6, or from its checkpoint.
The plate and the number
The plate, a slanted rectangle: X 616, Y 111, W 35, H 20, #f5f5f7, the shape M 5 0 H 35 L 30 20 H 0 Z, named Ahead plate. On it, N, rival_ahead_number, the car’s number: Exo 2, 17, Black, italic, #0a0a0d, centred, the anchor at the top centre, X 633, Y 111.
Its position and name
Two texts an Expression will fill. T, P1 CLASS, Exo 2, 12, Bold, letter spacing 0.7, #ff7363, X 616, Y 93, named Ahead label; in its format, Prefix AHEAD · and When empty AHEAD. T, M. Verhaegen, Exo 2, 15, Bold, #f5f5f7, X 659, Y 112, named Ahead name.
Next to the name’s node:
p = @class_position ;$label = p > 1 ? "P" + str(p - 1) + " CLASS" : "" ;$name = shortname(@driver_ahead_name)label to value on Ahead label, just above, name to the name’s value. shortname cuts the first name down to its initial: a long name fits in the tile. Leading the class, the Expression gives an empty text: the label shows its When empty, AHEAD.
The gap, its trend, its last lap
The gap: N, gap_ahead_s, two decimals, Prefix - (it is ahead), When empty -.--, 0 counts as empty. Exo 2, 36, Extra bold, italic, #ff7363, X 616, Y 131.
The trend: N, rival_ahead_gap_trend_s, two decimals, Show + sign, Suffix / LAP, When empty a single space, 0 counts as empty. Exo 2, 12, Bold, #b9b9c2, aligned right, the anchor at the top right, X 832, Y 93. Negative, you are catching it.
Its last lap: N, rival_ahead_last_lap_s, Time m:ss.ccc, When empty -:--.---, 0 counts as empty. Exo 2, 17, Bold, italic, #d2d2da, aligned right, the anchor at the top right, X 832, Y 150.
The car behind
The same tile, 134 pixels lower, in green #5cf09a: the behind channels instead of the ahead ones, a + before the gap, and for the label Prefix BEHIND · , When empty BEHIND. The plate is duplicated (Ctrl+D), the rest is placed as above; the dimensions are at the bottom of the page. Its Expression:
p = @class_position ;$label = @gap_behind_s > 0 ? "P" + str(p + 1) + " CLASS" : "" ;$name = shortname(@driver_behind_name)With nobody behind, the gap is 0: the Expression gives an empty text, the label just says BEHIND.
Put both blocks away
Ahead plate, Shift+click Ahead last lap, Ctrl+G, Ahead. Then Behind plate to Behind last lap, Behind.
The checkpoint
Section titled “The checkpoint”Download first-dash-7.slxd: the dash at the end of this chapter.
In the editor
Section titled “In the editor”The rivals come from the race’s field, and the trend from your last three laps: the editor, with no race, shows a sample field and an empty trend. To see your block filled, set these channels by hand in the simulated telemetry (driver_ahead_name, gap_ahead_s, rival_ahead_gap_trend_s…): a value you set comes before the calculation.
If it gets stuck
Section titled “If it gets stuck”The name and the gap stay empty. There is nobody ahead of you in your class: you lead it. In the simulated telemetry, set class_position to 2 or more, or set driver_ahead_name and gap_ahead_s by hand.
The dimensions
Section titled “The dimensions”| Layer | Tool | Channel or text | Format | X | Y | Size | Colour | Alignment |
|---|---|---|---|---|---|---|---|---|
Ahead plate |
Rectangle | M 5 0 H 35 L 30 20 H 0 Z |
35 × 20 | 616 | 111 | #f5f5f7 |
||
Ahead number |
Number | rival_ahead_number |
633 | 111 | 17, Black, italic | #0a0a0d |
centre | |
Ahead label |
Text | wired to the Expression | AHEAD · before, AHEAD if empty |
616 | 93 | 12, Bold | #ff7363 |
left |
Ahead name |
Text | wired to the Expression | 659 | 112 | 15, Bold | #f5f5f7 |
left | |
Ahead gap |
Number | gap_ahead_s |
2 dec., - before, -.-- if 0 |
616 | 131 | 36, Extra bold, italic | #ff7363 |
left |
Ahead trend |
Number | rival_ahead_gap_trend_s |
2 dec., sign, / LAP |
832 | 93 | 12, Bold | #b9b9c2 |
right |
Ahead last lap |
Number | rival_ahead_last_lap_s |
m:ss.ccc | 832 | 150 | 17, Bold, italic | #d2d2da |
right |
Behind plate |
Rectangle | the same shape | 35 × 20 | 616 | 245 | #f5f5f7 |
||
Behind number |
Number | rival_behind_number |
633 | 245 | 17, Black, italic | #0a0a0d |
centre | |
Behind label |
Text | wired to the Expression | BEHIND · before, BEHIND if empty |
616 | 227 | 12, Bold | #5cf09a |
left |
Behind name |
Text | wired to the Expression | 659 | 246 | 15, Bold | #f5f5f7 |
left | |
Behind gap |
Number | gap_behind_s |
2 dec., + before, -.-- if 0 |
616 | 265 | 36, Extra bold, italic | #5cf09a |
left |
Behind trend |
Number | rival_behind_gap_trend_s |
2 dec., sign, / LAP |
832 | 227 | 12, Bold | #b9b9c2 |
right |
Behind last lap |
Number | rival_behind_last_lap_s |
m:ss.ccc | 832 | 284 | 17, Bold, italic | #d2d2da |
right |
All in Exo 2, Vertical on line, top; the labels with a letter spacing of 0.7.