Written by Alcator, to whom I apologize for the delay of publishing this article.
Trackmania Forever enhanced the MediaTracker tutorial with a new option for Clips – the “Condition” option.
The option is by default set to “None”, and, what is perhaps quite important to notice, belongs to the CLIP, not its contents, which means the value is not exported if you export the clip, nor is it imported from an exported clip into a new one.
Other possible values of the Condition option are:
- RaceTime < x
- RaceTime > x
- Already Triggered x
- Speed < x
- Speed > x
- Not Already Triggered x
… with “x” being the parameter for the condition. x is ALWAYS numerical, but it can be decimal in RaceTime and Speed cases.
What this option does is it checks the condition specified whenever the clip might be triggered, and only if the condition is met does it actually trigger the clip.
So, if you put a clip near the start of a multilap track and set its condition to “Speed > 200″, the clip will only trigger on Lap 2 (and later), because on Lap 1, the car is going too slow. Or you might place triggers for 3 different clips right after start (in a row), the first querying if RaceTime > [Time at which you enter lap 3], the second querying if RaceTime < [Time at which you enter lap 3] and the third querying if RaceTime < 8 seconds; each of the clips would “wait” for 2 seconds and then display “You are now on Lap X”. In case you are confused by what I just wrote, imagine how this would resolve during actual race:
Say each lap of this three lap race takes 25 seconds on average. So, “Time at which you enter lap 3″ would be 50 seconds, or perhaps 45 to be sure even fastest players fit.
- When the race starts, the player moves forward, entering the triggering cube for clip 1 (“Time > 45 ?”). This is NOT true, the condition is NOT met, so the clip doesn’t trigger.
- The second clip DOES trigger, because Time < 45. However, before the “You are now on Lap 2″ appears, the car also enters the triggering cube for Clip 3, which asks “Time < 8?” This is also true, which means Clip 3 (for Lap 1) gets triggered, and after 2 seconds, “You are now on Lap 1″ gets displayed.
- Upon entering Lap 2, the car passes trigger for clip 1 (Lap 3). Time is somewhere between 25 and 40, so the Clip 1 condition (Time > 45 ?) is not true and nothing happens.
- Then, it enters trigger for clip 2: “Time < 45? ” – Yes, this is true, so Clip 2 gets triggered.
- Next, the car enters trigger for Clip 3: “Time < 8 ?” – NO! This is not true. after a short while, “You are now on Lap 2″ gets displayed.
- Upon entering Lap 3 and the triggering cube for Clip 1, “Time > 45 ?” becomes TRUE, so “You are now on lap 3″ gets displayed.
This somewhat complex example also shows that creating some complex effects using this feature will require a bit non-lateral thinking and perhaps even a bit of a genius.
Without “conditioning”, a clip was always triggered at the first moment when the game registered that the car entered the triggering cube. So, if you placed the triggering cube on a normal leveled CP tile, the clip would get triggered when the car entered the CP’s tile (even before passing the CP).
However, with conditioning, the clip may get triggered if the condition becomes true inside the triggering cube. In other words, it is by all means possible that the car enters a triggering cube, doesn’t yet meet the condition (such as speed), but during moving through the cube, the condition becomes met, and the clip gets triggered. To test this, place a Start tile, a normal road tile, a CP tile and some other stuff after that in a Stadium track, then place a triggering cube at the CP and give it the condition “Speed > 142″. The car enters the CP tile at about 120, but exits it at about 150, so the clip gets triggered somewhere inside the CP tile.
Let’s now go through the list of possible conditions and explain what is what in greater detail.
Speed greater than / Speed less than X
This condition checks whether the car is going below / above the required speed. The speed may be fractional (150.35). This is good for testing whether the car has enough speed for a stunt ahead. As a general rule of thumb, you should set the condition so that those who do NOT fit the requirement (those who are either too slow or too fast) are given warning, and only after you’ve done that, you may optionally display some confirmation for those who are ok. So, before a sharp turn, you would place “Speed > 300″ condition and display “Slow down!”, while before a long jump, you would place “Speed < 490″ condition and display “Take the detour right!”
RaceTime greater than / less than X
This checks whether the car is racing less than or longer than the given time in seconds. Just a reminder to those not familiar with the concept of time: 1 minute is 60 seconds, 1 hour is 3600 seconds, so to check whether a car is “on the move” for 3 minutes already, you’d test against the value 180 (seconds). Fractional values are possible (180.50 means 180 and a half second).
The final two conditions gave me some headaches before I cracked them. So, to save you the trouble, here comes…
(Not) Already Triggered X
The X refers to the clip’s undisplayed internal ID number, starting from 0. The first clip in your MediaTracker has ID 0, second has ID 1 etc. The condition “Already Triggered 5“, for instance, will be TRUE if the Clip that is 6th on the first page of clips has already been triggered by the player. “Not Already Triggered 5” will be true if the player has not yet triggered the 6th clip on the first page.
For your convenience, I suggest naming clips (from now on) in the style “X – [Name]“, such as “0 – Idling on start” or “1 – Launching GPS”. This way, you will know the number to use in Already Triggered condition.
What can you achieve with this type of condition?
Cool trick #1 – Logical checkpoints:
Tell the player that he has to pass through all locations of a given type (such as jump through all “windows” or drop through all holes or ride on all platform tiles with the newly added gray “bump”). Let’s say you create 6 such places and place triggers for clips ID 0 through 5 on each of them (remember that a clip may have any number of triggering cubes, which allows you to create these “logical” checkpoints of any shape and size).
At the end of the track, you create a narrow “corridor” (1 tile wide, 6 tiles long), and on each of the tiles of this corridor, you’ll trigger (conditionally) one clip; the conditions will be “Not already triggered 0″, “Not already triggered 1″ … “Not already triggered 5″. This means that if the player missed any of those logical checkpoints, the corresponding clip (at the checkpoint) was not triggered, and the corresponding “validation” clip here in the corridor will get triggered. The 6 clips at the end will all contain a fast fade into black that keeps playing, and behind this corridor, there must be some section that is impossible to navigate without visuals (such as a diagonal jump or driving across a diagonally connected platform tiles). So, a player that misses any of the logical checkpoints will get a black fade here and won’t be able to finish.
Cool trick #2 – Optional guidance tips
Imagine a complex maze-like track for which you’d like to provide some guidance tips, but only optional. So that players who already know what to do are not bothered by the tips. Before “Forever” came, this would be very difficult to do even on tracks that don’t need any mediatracking for wallrides or loops, and would be virtually impossible for tracks WITH mediatracking along the way. However, Forever allows you to do this easily. All you have to do is create a split/merge section on start (such as a road fork that immediately merges back into one path), and tell the player that if he passes the left path in this fork, he will drive without tips, while the right path will provide tips. Place two clips’ triggers to these two paths; one clip will say “Playing with tips” and one “Playing without tips”. Rename the clips like “1 – With tips” and “2 – Without tips”.
Then, whenever you come to a place where tip might be displayed, you’ll place a clip with the condition “Already Triggered 1” (if clip ID 1 is the one in “with tips” branch) and display the tip.
If the tip should appear inside a MT-requiring section, such as during a loop, you’ll place two clips there (i.e. before the loop): one that will get triggered if “Already Triggered 1″ and the other if “Not already triggered 1″ (or “Already triggered 2″ – please note that there may be several ways of achieving the same goal). Each of those clips will contain the needed MT (loop camera etc.), but only one of those will also display the tip. Of course, the needed MT, such as the loop camera, will have to be slightly shifted (in time) in one of those clip (the one that gets triggered further from the loop etc.)
Cool trick #3 – Being the cop
You noticed all those fancy speed limit signs in Coast? Well, now you CAN be the cop that punishes players who go too fast. Place triggering cubes all across the section where you issued a speed limit, all for the same clip (let’s say it’s clip ID 4). Give the clip the condition “Speed > 90″ (ouch!). Of course you could just fade the picture black when the car is speeding, but no, that would be too simple. Instead, at the end of the section, make a clip that gets triggered if clip ID 4 was already triggered, and which says “Cops got you. Turn right on the next intersection for penalty.” The path that the player is thus told to take is, let’s say harder or longer. And if he doesn’t comply and continues straight behind the intersection, place another clip that once again gets triggered only if clip ID 4 was already triggered, and which fades the screen black. Cool, right?
Notes about replay MT…
In replays, the condition value has no effect. You cannot use these conditions to control when the clip gets triggered. Replays are controled solely by triggering cubes, nothing else. And since Intro has only one clip that gets triggered automatically, you cannot use conditions in Intro either.