# This code connects the checkpoints # It tells the game what happens when a player passes them # First, we define the devices # These are the boxes we placed in the world Start_Checkpoint := Race_Checkpoint_Device Middle_Checkpoint := Race_Checkpoint_Device Finish_Checkpoint := Race_Checkpoint_Device # This function runs when someone hits the Start On_Start_Hit := func(): # Tell the Middle checkpoint to get ready Middle_Checkpoint.Set_Active(true) # Show a message to the player Print("Go! Drive to the middle!") # This function runs when someone hits the Middle On_Middle_Hit := func(): # Tell the Finish checkpoint to get ready Finish_Checkpoint.Set_Active(true) # Show a message to the player Print("Great! Drive to the finish!") # This function runs when someone hits the Finish On_Finish_Hit := func(): # Stop the race timer Race_Manager.Stop_Timer() # Show a big message Print("You won! Race complete!")