Category: Player
Since engine version: 9.0 OC
SetNextScenario
Description
If you call this function in a scenario you will get an option to launch another, or the same scenario, in the scenario end screen.
Syntax
bool SetNextScenario(string scenario_name, caption string, description string);
Parameters
- scenario_name:
- This is the path to the scenario file that should be started next. The path is relative to the game folder. Scenario paths contain all .oc* paths and the "\" file separators have to be escaped, e.g. "Missions.ocf\\Raid.ocs".
- string:
- [opt] Text that is displayed on the button that launches the scenario.
- string:
- [opt] Description text for the button.
Remark
You can call this function multiple times during the scenario, but only the last call before the game is over is binding.
Examples
SetNextScenario("Missions.ocf\\Raid.ocs", "Start the raid mission.", "Launches another scenario.");
Defines, that the next scenario will be the "Raid" mission.
SetNextScenario("MyScenarioFolder.ocf\\MyScenario.ocs", "Restart round.", "Start this scenario from the beginning.");
If called in "MyScenarioFolder.ocf\MyScenario.ocs" this can be used to add a retry-option to that scenario.
See also: GainScenarioAccess, GetScenarioAccess
See also: Scenario parameter definitions