Set the active traffic group upon reaching a stage.
Scope
This command should be called between calls to AddStage and CloseStage in a mission's initialisation script.
Syntax
SetStageTrafficGroup( group_index );Game.SetStageTrafficGroup( group_index )- group_index: The index of the traffic group to switch to.
Examples
AddStage();
// Switch to traffic group 2 when reaching this stage.
SetStageTrafficGroup(2);
AddObjective("dummy");
CloseObjective();
CloseStage();Game.AddStage()
-- Switch to traffic group 2 when reaching this stage.
Game.SetStageTrafficGroup(2)
Game.AddObjective("dummy")
Game.CloseObjective()
Game.CloseStage()Notes
This requires the
DynamicTrafficfeature of the Custom Traffic Support hack to be enabled as well as actually defining multiple traffic groups to have any noticeable effect.- This will persist until the player enters a Trigger Volume (0x3000006) inside a Locator (0x3000005) that changes the traffic group using the Custom Trigger Actions hack, a subsequent stage calls the command again or the player mission selects to a mission that calls UseTrafficGroup.