Forum Mod Bakery Docs

M7L1 Crashing

Posted in Support
Please login to contribute to the conversation.
i dont know why is crashing, i tried soo many times , but it still crashes in Loading
PD: i loaded All , except PickupA and  MinivanA , since those are Traffic Vehicles
the new locations are in the P3D ,m7_wagon is in L1 , just like m6_canyanaro_sd for the Forced Car M6L1 , but still crashes
SelectMission("m7");SetMissionResetPlayerInCar("m7_wagon");
SetDynaLoadData("l1z6.p3d;l1r6.p3d;l1z3.p3d;l1r3.p3d;l1r2.p3d;");
InitLevelPlayerVehicle("wagonA","m7_wagon","OTHER");UsePedGroup(7); SetForcedCar();//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","m7_smithers_carstart","NULL","Missions\level01\M7race.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();
 //ActivateVehicle("smith_v","NULL","race");
 AddStageVehicle("smith_v","m7_smithers_carstart","race","Missions\level01\L1cop.con", "smithers");
        AddStageVehicle("pickupA","m7_lenny_carstart","race","Missions\level01\L1cop.con", "lenny");
        AddStageVehicle("sedanA","m7_worker_carstart","race","Missions\level01\L1cop.con", "male2");
        AddStageVehicle("minivanA","m5_sedan","NULL","Missions\level06\sr3_1st.con", "male3");
//SetStageAIRaceCatchupParams( 
// STAGEVEHICLENAME,
//      ALONGROADDISTFROMPLAYER_TO_APPLYMAXCATCHUP, // default = 80
//      FRACTIONPLAYERSPEED_MINCATCHUP,   // default = 0.5
//      FRACTIONPLAYERSPEED_NOCATCHUP,    // default = 1.1
//      FRACTIONPLAYERSPEED_MAXCATCHUP )  // default = 1.7 AddStageWaypoint( "m7_smithers_race1" );
//SetStageAIRaceCatchupParams("smith_v", 80, 0.5, 1.1, 1.7); 
//SetStageAIRaceCatchupParams("smith_v", 80, 0.75, 1.1, 2.3); 
SetStageAIRaceCatchupParams("smith_v", 80, 0.5, 1.0, 1.5);
SetStageAIRaceCatchupParams("pickupA", 80, 0.5, 1.0, 1.5);
SetStageAIRaceCatchupParams("sedanA", 80, 0.5, 1.0, 1.5);
// SetVehicleAIParams( "smith_v", -10, -9 );   // no shortcuts
 AddStageWaypoint( "m7_smithers_race1" );
 AddStageWaypoint( "m5_smithers_nav1" );
 AddStageWaypoint( "m7_smithers_race1b" );
 AddStageWaypoint( "m7_smithers_race9" );
 AddObjective( "race","both");
  AddNPC("burns", "m7_burns_place");
  AddCollectible("m7_smithers_race1");
  AddCollectible("m7_smithers_race2");
  AddCollectible("m7_smithers_race3");
  //AddCollectible("m7_smithers_race4");
  AddCollectible("m7_smithers_race5");
  AddCollectible("m7_smithers_race6");
  AddCollectible("m7_smithers_race7");
  AddCollectible("m7_smithers_race9");
 CloseObjective();
 AddCondition("race");
  SetCondTargetVehicle("smith_v");
  SetCondTargetVehicle("pickupA");
  SetCondTargetVehicle("sedanA");
 CloseCondition();
 StageStartMusicEvent("M7_drama");
CloseStage();AddStage(0);
 SetHUDIcon( "bsedan_v" );
 SetStageMessageIndex(258);
 ActivateVehicle("minivanA","NULL","chase");
 AddObjective("losetail");
  SetObjTargetVehicle("minivanA");
  SetObjDistance(200);
 CloseObjective();
 AddCondition("outofvehicle");
  SetCondTime( 10000 );
 CloseCondition();
 AddCondition( "damage" );
  SetCondMinHealth( 0.0 );
  SetCondTargetVehicle( "wagonA" );
 CloseCondition();
 SetStageTime(45);
 AddCondition("timeout");
 CloseCondition();
  //SetHitNRun();
 CloseCondition();
 ShowStageComplete();
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
I think that the problem may be here:
AddCondition("race");
   SetCondTargetVehicle("smith_v");
   SetCondTargetVehicle("pickupA");
   SetCondTargetVehicle("sedanA");
CloseCondition();
The problem is that you can ONLY use the SetCondTargetVehicle setting for races against 1 opponent, not 2 or more.

Instead, you must use SetCondPosition(1) for races with 2 or more opponents, like this:
AddCondition("position");
   SetConditionPosition(1);
CloseCondition();
Try that and see if it works!  :)
Nope , still crashes :(
If you could, would you mind uploading the edited m7i.mfk and m7l.mfk to Pastebin? The BBCode Editor isn't terribly great and messes up some of the formatting, making this script incredibly hard to read, especially with the useless commented out junk.
M7l
M7i

here are ;)
So... after removing all the useless junk (the lines that started with \\) from the script, I noticed a few things wrong...

THINGS I NOTICED
1.
The vehicle "pickupA" is being driven by Lenny. The problem with this is that Lenny is programmed to be a vehicle driver in the game, so you should probably change the driver to someone else.
2. The "AddCondition("race") is incorrect... but I've already mentioned that.
3. In your Avoid stage, you put the CloseObjective text twice near the end of that stage. You should probably remove one of those.

Other than that, I don't really see anything else wrong... but there probably is something obvious I missed. Let me know if it still crashes after fixing it...
i fixed 1 and 2 , but i dont fully understand 3
it still crashes
3. In the avoid stage of your mission (this one):
AddStage(0);
   SetHUDIcon( "bsedan_v" );
   SetStageMessageIndex(258);
   ActivateVehicle("minivanA","NULL","chase");
   AddObjective("losetail");
      SetObjTargetVehicle("minivanA");
      SetObjDistance(200);
   CloseObjective();
   AddCondition("outofvehicle");
      SetCondTime( 10000 );
   CloseCondition();
   AddCondition( "damage" );
      SetCondMinHealth( 0.0 );
      SetCondTargetVehicle( "wagonA" );
   CloseCondition();
   SetStageTime(45);
   AddCondition("timeout");
   CloseCondition();
   //SetHitNRun();
   CloseCondition();         // This line is un-needed. You should remove it.
   ShowStageComplete();
CloseStage();

I can't find anything else wrong... but if I do, I'll let you know.
still crashes :(
Quick question - Did you want the player to start IN their vehicle every time the mission begins?