Forum Mod Bakery Docs

How to add a stationary vehicle to a mission?

Posted in Support
Please login to contribute to the conversation.
Hi,

A lot of questions today, just productive, I suppose. I'd like to add a stationary ambulance to a mission so the player can't use a certain shortcut. I've played around with the script a bit, doesn't seem to be as simple as I thought it would be. Somehow the car's moving by itself without having activated it. I tried replacing OTHER with NULL, but it just crashes.

This is the code in the mxi file:
AddStageVehicle("ambul","m3_ambul","OTHER","Missions\level02\M3race.con","male2");

Here is the code in the mxl file:
LoadDisposableCar("art\cars\ambul.p3d","ambul","OTHER");
If I remember correctly, mxi should have:
AddStageVehicle("ambul","m3_ambul","NULL","Missions\level02\M3race.con","male2");

Rather than loading it with "OTHER", which is generally used for forced car missions, you'll want to load it with "AI", as seen here:
LoadDisposableCar("art\cars\ambul.p3d","ambul","AI");
Unfortunately, that didn't work. Which is strange, since the code should be treating it just like another AI vehicle that's not activated yet.
Is this a race stage? If that's the case, I'm not sure there's a way around this.
Note: In order for a vehicle to remain completely stationary, you might need to create a con file with a mass equal to 100 millions. Don't ask me how it works, but, it does. The car won't slide on slopes, and the player won't be able to push through it
Gordon has an interesting idea. Would it work if the vehicle had a race AI?
Would it be possible to add it to the mxsdi file?
[deleted user]
5 yrs ago (Statistics)
Yeah and yeah, as far as I can tell, AI type doesn't really matters. And the pre-mission is (practically) same as a regular mission, it should work if everything's done correctly
If I may ask, out of curiosity, what is the shortcut that you are trying to block in question?
It's the fountain shortcut in the main section of Level 2.