Forum Mod Bakery Docs

How to stop an AI car from slowing down when the player falls behind in a race?

Posted in Support
Please login to contribute to the conversation.
For example, it seems that in The Fat and The Furious if the player falls behind, Smithers slows down a bit to give the player a better chance of catching up.
How does that work, and is there a way to disable it?
I'm unsure if it has anything to do with SetStageAIRaceCatchupParams or not.
That command (SetstageAIRaceCatchupParams) sets the car to slow down when the player is too far behind (exactly what you said). How far behind you have to be and how much it slows down. I don't quite understand it but in that very mission Radical has some comments somewhat explaining it (that basically says what I just said):

//SetStageAIRaceCatchupParams( 
//	STAGEVEHICLENAME,
//      ALONGROADDISTFROMPLAYER_TO_APPLYMAXCATCHUP, // default = 80
//      FRACTIONPLAYERSPEED_MINCATCHUP,   // default = 0.5
//      FRACTIONPLAYERSPEED_NOCATCHUP,    // default = 1.1
//      FRACTIONPLAYERSPEED_MAXCATCHUP )  // default = 1.7

If you want to disable this behavior, you can take out the command. Otherwise you can try and tweak it and see what happens.
[deleted user]
8 yrs ago (Statistics)
Does the command also make the AI rubber band back toward you if you get far ahead?
I'm not really sure. I don't have that much experience using it.