Apologies for the late reply. Again, I imagine SomeBot might not be entirely comfortable with the idea of those models being used, so I would highly advise contacting him about it.
I'm actually not entirely certain that swapping out the forced vehicle matters in most situations, but it's worth doing to bring the player's default vehicle back in without having to go through the Phonebooth whenever possible!
I'm still looking through the script, but I'm not seeing any immediate issues with it that seem like they would cause crashing?
- According to current documentation, AddStageVehicleCharacter will default to adding an NPC model to the vehicle's 'pl' joint at 180 degrees. This means that you don't need to specify where 'bart2' goes in the first instance use. AddStageVehicleCharacter("tgxbus", "bart2"); on it's own would be fine.
- Does wiggu_v have a 'pl_2' joint? Bart likely will not appear in the vehicle properly if the car doesn't have one.
- Do all the locators appear to be present in the modified m7.p3d you're loading? An invalid waypoint name or referring to a waypoint that doesn't exist should instantly crash the game.
- Does the game appear to crash if you were to remove all of the stages except the first one? A quick and dirty way to easily debug missions is to just remove most of the stages and throw them into a temporary text bin and slowly add them back. The mission will end abruptly once the first (and only) stage is cleared, but it's a good way to easily test if there's something wrong with one of the later stages.
If all else fails, Lucas' Mod Launcher stores crash debug logs in [usernamehere]\Documents\My Games\Lucas' Simpsons Hit & Run Mod Launcher\Crashes. If you could, are you able to upload the very latest crash file and upload it to a file sharing service such as
Dropbox,
Google Drive, or
MEGA? It's possible to analyze the crash file the Launcher generates to help pinpoint the exact issue. Thank you.
I've got good news! After trying out the stage by stage, I found the problem! It appears that the Timer objective was in the wrong place for the last two stages! After tweaking them, this is what it now looks like.
SelectMission("m7");
SetMissionResetPlayerInCar("m7_flamix_carstart");
SetDynaLoadData("l1z1.p3d;l1r1.p3d;l1r7.p3d;");
InitLevelPlayerVehicle("wiggu_v2","m7_flamix_carstart","OTHER");
SetNumValidFailureHints( 5 );
UsePedGroup( 0 );
SetForcedCar();
AddStage(0);
SetStageMessageIndex(01);
NoTrafficForStage();
SetHUDIcon("tgxbus");
AddStageVehicle("tgxbus","m7_aicar_carstart","target","Missions\level01\M7bus.con", "joras");
AddStageVehicleCharacter("tgxbus", "bart2");
AddStageWaypoint( "d1_path1" );
AddStageWaypoint( "d1_path4" );
AddStageWaypoint( "d1_path6" );
AddStageWaypoint( "d1_path8" );
AddStageWaypoint( "d1_path10" );
AddStageWaypoint( "d1_path11" );
AddStageWaypoint( "d1_path13" );
AddStageWaypoint( "d1_path14" );
DisableHitAndRun();
SetStageTime(299);
StartCountdown("count");
AddToCountdownSequence( "3", 1000 ); // duration time in milliseconds
AddToCountdownSequence( "2", 1000 ); // duration time in milliseconds
AddToCountdownSequence( "1", 900 ); // duration time in milliseconds
AddToCountdownSequence( "GO", 400 ); // duration time in milliseconds
AddObjective("destroy");
SetObjTargetVehicle("tgxbus");
CloseObjective();
AddCondition("timeout");
//SetHitNRun();
CloseCondition();
AddCondition("outofvehicle");
SetCondTime( 10000 );
CloseCondition();
AddCondition( "damage" );
SetCondMinHealth( 0.0 );
SetCondTargetVehicle( "wiggu_v2" );
CloseCondition();
ShowStageComplete();
SetIrisWipe(0.1);
CloseStage();
AddStage(0);
SetHUDIcon("simpsons");
SetStageMessageIndex(02);
AddObjective( "goto" );
AddStageVehicleCharacter("wiggu_v2", "bart2","pl_2",180);
RemoveStageVehicleCharacter("tgxbus", "bart2");
SetDestination( "m7_simpsonhouse_sd", "carsphere");
SetCollectibleEffect("wrench_collect");
CloseObjective();
AddCondition("outofvehicle");
SetCondTime( 10000 );
CloseCondition();
AddCondition( "damage" );
SetCondMinHealth( 0.0 );
SetCondTargetVehicle( "wiggu_v2" );
CloseCondition();
SetFadeOut(1.0);
ShowStageComplete();
SwapInDefaultCar();
SetSwapDefaultCarLocator("m7_carend");
SetSwapForcedCarLocator("m7_copcar_sd");
SetSwapPlayerLocator("level1_homer_walkto");
CloseStage();
AddStage(0);
AddObjective("timer");
RemoveStageVehicleCharacter("wiggu_v2", "bart2");
AddNPC("bart2", "m7_cody_sd");
AddStageVehicle("wiggu_v","m7_somecop_carstart","NULL","Missions\level01\M7somecop.con", "somecop");
SetDurationTime(9);
CloseObjective();
CloseStage();
AddStage("final");
AddObjective("timer");
ActivateVehicle("wiggu_v","NULL","evade");
AddStageWaypoint( "d1_path1" );
AddStageWaypoint( "d1_path4" );
AddStageWaypoint( "d1_path6" );
AddStageWaypoint( "d1_path8" );
AddStageWaypoint( "d1_path10" );
AddStageWaypoint( "d1_path11" );
AddStageWaypoint( "d1_path13" );
AddStageWaypoint( "d1_path14" );
SetDurationTime(5);
CloseObjective();
CloseStage();
CloseMission();
After testing this script, it actually worked perfectly! So now, L1M7 has been fixed!
Also, about SomeBot not being sure about the idea of me using his models, don't worry, I contacted him and get this, he actually allowed me to use the models! However, I have to give him credit, which is what I like doing. Giving credit is the most important thing to do in anything. Anyways, thanks for helping me fix my issue. So folks, the Mod will go on soon! I hope you're looking forward to it!
(Post merged by moderator.)
Oh, and yes, the Car: "wiggu_v2" does indeed have a pl_2 seat, so bart2 (Which is Me) will appear properly, so that's something I'm glad I done.