This command binds a collectible in a dump objective to a waypoint.
Calling this command disables the player's ability to knock collectibles out of the car by slamming into it, so all collectibles in the stage must be bound to waypoints.
Scope
This command should be called between calls to AddObjective and CloseObjective in a mission's initialisation script.
Syntax
BindCollectibleTo( collectible_index, waypoint_index );Game.BindCollectibleTo( collectible_index, waypoint_index )- collectible_index: The 0-based index of the collectible.
- waypoint_index: The 0-based index of the waypoint to bind the collectible to.
Examples
AddStageWaypoint("m5_AI_path_4");
AddStageWaypoint("m5_AI_path_7");
AddStageWaypoint("m5_AI_path_10");
AddStageWaypoint("m5_AI_path_16");
AddObjective("dump");
SetObjTargetVehicle("snake_v");
AddCollectible("m5_collectible_1", "jeans");
AddCollectible("m5_collectible_2", "molemanr");
AddCollectible("m5_collectible_3", "h_soda");
BindCollectibleTo(0, 0); // jeans will drop when snake_v gets near m5_AI_path_4
BindCollectibleTo(1, 1); // molemanr will drop when snake_v gets near m5_AI_path_7
BindCollectibleTo(2, 2); // h_soda will drop when snake_v gets near m5_AI_path_10
CloseObjective();Game.AddStageWaypoint("m5_AI_path_4")
Game.AddStageWaypoint("m5_AI_path_7")
Game.AddStageWaypoint("m5_AI_path_10")
Game.AddStageWaypoint("m5_AI_path_16")
Game.AddObjective("dump")
Game.SetObjTargetVehicle("snake_v")
Game.AddCollectible("m5_collectible_1", "jeans")
Game.AddCollectible("m5_collectible_2", "molemanr")
Game.AddCollectible("m5_collectible_3", "h_soda")
Game.BindCollectibleTo(0, 0) -- jeans will drop when snake_v gets near m5_AI_path_4
Game.BindCollectibleTo(1, 1) -- molemanr will drop when snake_v gets near m5_AI_path_7
Game.BindCollectibleTo(2, 2) -- h_soda will drop when snake_v gets near m5_AI_path_10
Game.CloseObjective()