Forum Mod Bakery Docs

In my mission the ai car is not spawning in the right place

Please login to contribute to the conversation.
SelectMission("m7");

SetMissionResetPlayerInCar("m7_car_start");
SetDynaLoadData("l1z6.p3d;l1r6.p3d;");

UsePedGroup(7);

//Chuck: StreetRace Prop Load and Unload Setup - used here to load power plant door to block he shortcut
StreetRacePropsLoad("l1m7door.p3d;");
StreetRacePropsUnload("l1m7door.p3d:");


//AddStage(0);
// SetStageMessageIndex(12);
// AddObjective("getin","neither");
// SetObjTargetVehicle("current");
// CloseObjective();
//CloseStage();

//AddStage();
// RESET_TO_HERE();
// SetHUDIcon( "mansion" );
// SetStageMessageIndex(18);
// SetMaxTraffic(2); //for this race, reduce traffic to prevent overwhelming the user
// AddStageVehicle("smith_v","start","NULL","Missions\level01\M7Chase.con", "smithers");
// AddObjective("goto","nearest here");
// SetDestination("limo_start", "carsphere");
// SetCollectibleEffect("wrench_collect");
// CloseObjective();
//CloseStage();

AddStage(1);
RESET_TO_HERE();
SetMaxTraffic(2); //for this race, reduce traffic to prevent overwhelming the user
SetStageMessageIndex(18);
SetHUDIcon( "mansion" );
ShowStageComplete();
AddStageVehicle("smith_v","start","NULL","Missions\level01\M7Chase.con", "smithers");
ActivateVehicle("smith_v","NULL","chase");
AddStageWaypoint( "m7_smithers_race1" );
AddObjective("losetail");
SetObjTargetVehicle("smith_v");
SetObjDistance(2000);
CloseObjective();
CloseCondition();
CloseStage();

AddStage();
SetMaxTraffic(2);
SetStageMessageIndex(19);
SetHUDIcon( "burns" );
AddObjective("talkto");
AddNPC("burns", "m7_burns_place");
AddObjectiveNPCWaypoint( "burns", "m7_burns_walk_1" );
SetTalkToTarget("burns");
CloseObjective();
SetCompletionDialog("there");
CloseStage();

AddStage(0, "final");
AddObjective("dialogue");
AmbientAnimationRandomize( 1, 0 ); // ( pc=0, npc=1) (nonrandom=0, random=1)
AmbientAnimationRandomize( 0, 0 );
SetConversationCam( 0, "pc_far" );
SetConversationCam( 1, "npc_far" );
SetConversationCam( 2, "pc_far" );
SetConversationCam( 3, "npc_far" );
SetConversationCam( 4, "pc_far" );
SetConversationCam( 5, "npc_far" );

AddAmbientNpcAnimation( "none" );
AddAmbientNpcAnimation( "dialogue_yes" );
AddAmbientNpcAnimation( "none" );
AddAmbientNpcAnimation( "dialogue_cross_arms" );
AddAmbientNpcAnimation( "none" );
AddAmbientNpcAnimation( "dialogue_yes" );

AddAmbientPcAnimation( "dialogue_shaking_fist" );
AddAmbientPcAnimation( "none" );
AddAmbientPcAnimation( "dialogue_no" );
AddAmbientPcAnimation( "none" );
AddAmbientPcAnimation( "dialogue_hands_in_air" );
SetCamBestSide("m7_bestside2" );
SetDialogueInfo("homer","burns","accuse",0);
SetDialoguePositions("m7_homer_burns","m7_burns_place","race_finish",1);
CloseObjective();
CloseStage();

CloseMission();

//dialogue_hands_in_air
//dialogue_hands_on_hips
//dialogue_scratch_head
//dialogue_shaking_fist
//dialogue_thinking
//dialogue_yes
//dialogue_no
//dialogue_cross_arms
//dialogue_open_arm_hand_gesture
//dialogue_shake_hand_in_air





Load file
LoadP3DFile("art\missions\level01\m7.p3d");

LoadDisposableCar("art\cars\smith_v.p3d","smith_v","AI");

LoadP3DFile("art\missions\generic\fline.p3d");

LoadP3DFile( "art\frontend\dynaload\images\msnicons\location\mansion.p3d" );
LoadP3DFile( "art\frontend\dynaload\images\msnicons\char\burns.p3d" );
It would help if you would give a bunch of details such where you want your car to spawn & where is it spawning instead.
At a first glance, you want to spawn the car at a locator called "start". Check if the locator's position is correct in your P3D file.
In the m7 pd3 I have a start locator the position is behind homer
What type of Locator is it? Is it a Type 3?
I'm not sure if this block of code has any relevance, but I believe you should change the following block of code:
AddStageVehicle("smith_v","start","NULL","Missions\level01\M7Chase.con", "smithers");
ActivateVehicle("smith_v","NULL","chase");
to
AddStageVehicle("smith_v","start","chase","Missions\level01\M7Chase.con", "smithers");
If this doesn't fix, I suggest to double-check if the position is properly set to your locator & if that doesn't work, add my Discord at maz#4970 and send me a decompilable version of the mod so I can try finding the issue myself.
Type 3 and here's a picture of where he spawns.
I will try it thanks.
Thanks it worked.
You're welcome!