Set the maximum distance the player can be from the stage vehicle in a dump objective that uses BindCollectibleTo to make the stage vehicle drop stuff near specific waypoints.
Scope
This command should be called between calls to AddObjective and CloseObjective in a mission's initialisation script.
Syntax
SetObjFailDistance( fail_distance );Game.SetObjFailDistance( fail_distance )- fail_distance: The maximum distance the player can be from the vehicle before they fail.
- The default value without calling this command is 200.
- Use 0 to disable failing the player regardless of distance.
Examples
AddObjective("dump");
SetObjTargetVehicle("snake_v");
// Do not fail the player regardless of how far they get from snake_v
SetObjFailDistance(0);
AddCollectible("m5_collectible_1", "jeans");
AddCollectible("m5_collectible_2", "molemanr");
BindCollectibleTo(0, 0);
BindCollectibleTo(1, 1);
CloseObjective();Game.AddObjective("dump")
Game.SetObjTargetVehicle("snake_v")
-- Do not fail the player regardless of how far they get from snake_v
Game.SetObjFailDistance(0)
Game.AddCollectible("m5_collectible_1", "jeans")
Game.AddCollectible("m5_collectible_2", "molemanr")
Game.BindCollectibleTo(0, 0)
Game.BindCollectibleTo(1, 1)
Game.CloseObjective()