Ting Thing says it's already possible! Read below! (Note that this is the conversation had in the comments!)
You might be able to rig a race sequence even now. I haven't tried this but it's worth a shot:
Start the timeline using the command input for an NPC message. But instead of a checkered flagpole, make it a race to a custom item. Place the custom item at the end of the race and make it invisible using an invisible hide block. Have the NPC say something like "Let's have a race! Beat me to the coin and you can have it! My best time is 35 seconds." In this case, make sure that it takes exactly 35 seconds for the npc to reach the item.
At the start of the race, use the following commands:
Quote
reveal items
enable time = true
time = 35
Those time commands change the time limit settings for your area.
For one of your two area goals, you need to have the goal be to survive the time limit. The goal reward is to call the command prompt, and use "hide items" This will make the custom item at the end disappear, and it should happen at the same moment that the NPC arrives over it. So, if you survive the time limit, you're too late. The NPC got to the item before you. But if you manage to reach the item before the time limit runs out, you can call commands using the custom item.
You could also make the HUD invisible if you don't want to display the time remaining.
I asked "Is it possible to have the NPC congratulate you?"
Ting Thing replied:
Well, when the time runs out, you could disable the character, move the view to the npc and make the npc say something.
If you get the item, you could go to a cut scene where the npc finally arrives and tells you something else. You may want to change the area to make it easier to run the cut-scene. If you don't change the area, make sure you also turn off the area timer.
This is what I first said:
Now that we can program NPC's to go where we want them, why not create race goals and just program the NPC to run the race (of course with the goal of you beating the NPC) and whoever gets to the checkered flag wins! With of course command prompt tells it what to do after the race.