KDScript

KDTrapNextMission

This script works in T2 (TMA) only. It has no effect in DromEd game mode. In TG and T1 (TDP), which do not support nonlinear campaigns, it only writes an error to the monolog.

ParameterTypeDescriptionDefault value
next_mission_onintegermission number to set as next when turned on
next_mission_offintegermission number to set as next when turned off

When triggered, KDTrapNextMission changes which mission will begin after the current mission ends. (By default, the next mission is the mission specified in strings\missflag.str in the miss_X_next value [where X is the current mission], or else one mission past the current mission.) When turned on, this script sets the next mission to the value of the next_mission_on parameter, if defined; when turned off, it sets it to next_mission_off, if defined. The usual trap control flags, locking, and timing are respected.

Important: The engine does not perform any validation on mission numbers. If the next mission is set to a nonexistent mission, the game will crash as soon as it tries to load it. If the chosen mission has the skip flag set, it will still be skipped; for example, choosing 3 (the cancelled museum mission) in Thief II will load mission 4 (Framed). If the mission calling this script has the end flag set, this script will have no effect, as the campaign will end after this mission regardless.

This script is part of the KDScript module. Copyright © 2012–2013 Kevin Daughtridge. See introduction for details.