Forum Mod Bakery Docs

My Follow Mission keeps automatically completing itself when i get in my car.

Posted in Support
Please login to contribute to the conversation.
Hey Guys, from the title obviously my mission i created keeps completing itself when i get in my car by the way the car im following is in the Black Van location on evergreen terrace, also i can't get the car im following to go the pathway i've set, is there anything wrong in the .mfk


The pathway i have set is from Flowers by Irene (L1M5) and i've loaded all the necessary p3d files yet the car won't move when i get in the car and the mission just completes instantly is there something vital i'm missing?
You're not missing anything. The very first stage you've made it set to "final". That causes the game to assume you're on the final stage so it just completes itself. You can either change it to any number you want or just leave it blank. Either will work.
No the image i showed was a snapshot of the second stages code, heres an image from Stage 1 to 2 (final)
The issue is that cBlbart isn't set to do anything (it's behavior is set to "NULL", which means that it'll just stand still).

In the second stage, remove the AddStageVehicle function. Then, in it's place, put this:
 
ActivateVehicle("cBlbart", "NULL", "target");
Since you've already added cBlbart in the first stage, this line in the second stage will tell it to start moving and follow the waypoints you've defined.

Hope this helps!
Thank you yet again :) 
Anytime. Glad to help someone who is enthusiastic about modding SHAR.

Note that in addition to "target" working, "evade" also works. Radical switches between the two, and claims that "target" makes things a bit easier on the player. Apparently "evade" will be slightly faster, but both work fine for your purpose. Feel free to switch between the two and see what works best.
This post has been removed.
8 yrs ago (Statistics)
Actually, disregard what I said. I confused what Radical said about "target" with "race". I was looking at L1M5's script which seemingly had "race" for the Van's behavior at one point judging by the comments (you can put anything behind "//" and the game will simply ignore it. Useful for making notes about why certain things are in certain areas.)

But, again, both ":evade" and "target" will work for "follow" missions seemingly just fine. Not sure if there is a difference since both seem almost identical to one another. So feel free to use whatever one suits you best.

And SHAR is a great place to learn how to do scripting. Once you understand how functions in this game work, you'll find that creating entirely new missions is a pretty fun and rewarding script.
Still doesn't work im not sure if im being stupid or not hahaha im 100% sure there is nothing wrong with the script 
Everytime i enter the final stage of the mission (when i get into my vehicle) the game crashes, i've loaded all necessary p3d's in my load file.
Whats wrong with the script? i've loaded sports_v.p3d in loadfile and the m5.p3d which the van paths are from! 
BELOW IS MY LOAD FILE.
Huh. Strange. Everything appears to be right.

SetVehicleAIParams( "cBlbart", 50, 51 ); 
SetStageAITargetCatchupParams(    "cBlbart", 20, 70);
The game might be expecting some AI parameters in the second stage. Try placing these in and see if it works (preferably right under the ActivateVehicle bit).