temporaries

The temporaries namespace contains temporary variables, a feature backported from Halo 4 to the Halo: The Master Chief Collection version of Halo: Reach. Gametypes that use these variables are incompatible with the original Xbox 360 version of Halo: Reach, and with MCC versions that predate the mid-July 2023 update.

You should not refer to temporary variables directly (e.g. temporaries.number[n]); this namespace is provided for use by ReachVariantTool's decompiler. You are encouraged to instead use allocation to aliases.

Notes

Temporary variables do not need to be declared, and cannot be given an initial value or a networking priority. Declaring a temporary variable is a warning (and the declaration is ignored) unless you specify an initial value or networking priority, in which case it's an error.

Temporary timers don't exist. (How would they? Temporaries aren't meant to last for longer than some individual task during a single frame; they can't be used to track things across time.)

When you write scripts using MegaloEdit, the official Megalo editor by Bungie and 343 Industries, you can use a larger number of temporary variables than in ReachVariantTool. Both tools face the same limit on how many temporary variables can exist, but if you hit that limit in MegaloEdit, its compiler will "spill over" into any global variables that you haven't already used, repurposing them as temporary variables. ReachVariantTool is unable to do this due to technical limitations in its design.

Members

number[n]

Temporary numbers. Ten are available, numbered from 0 to 9.

object[n]

Temporary objects. Eight are available, numbered from 0 to 7.

player[n]

Temporary players. Three are available, numbered from 0 to 2.

team[n]

Temporary teams. Six are available, numbered from 0 to 5.