Forum Mod Bakery Docs

Making a Race Mission

Posted in Support
Please login to contribute to the conversation.
I've never made a mission before and I want to know how to make a one. I want to know how to make a race mission. If anyone knows how to make a race mission please let me know.
AddStage();
// AddStageVehicle("name_of_car","car_spawnpoint","ai_type","ai_script","name_of_driver");
AddStageVehicle("skinn_v","m1_skinncar","race","Missions\level01\M1race.con","skinner");
AddStageWaypoint( "m1_AI_path1" ); // Where the AI vehicle drives to, repeat for multiple destinations
AddObjective( "race", "both" );
AddCollectible("m1_AI_path4", "carsphere"); // Objective is to reach this destination
CloseObjective();
AddCondition("race"); // Mission will fail if AI reaches its destination before you complete the objective
SetCondTargetVehicle("skinn_v");
CloseCondition();
CloseStage();

Let me know if you have any other questions.
I also noticed that some modders use the HUD to make characters talk to each others. How do I do that?
If I wanted Ned to say "Howdily doodly" in L1M1, in the CustomText.ini, I'd write:
[CustomTextL1M1]
MISSION_OBJECTIVE_21=HOWDILY DOODLY
Because this is L1M1, I'll edit the scripts\missions\level01\m1l.mfk file, in it, I write:
LoadP3DFile( "art\frontend\dynaload\images\msnicons\char\ned.p3d" );
This tells the game to load the HUD icon for Ned Flanders in L1M1. In the m1i.mfk file, I write this:
AddStage();
SetHUDIcon("ned");
SetStageMessageIndex(21);
AddObjective("timer");
SetDurationTime(3); // The stage will run for 3 seconds before moving to next stage.
CloseObjective();
CloseStage();