Context Transitions

From HLKitWiki
Revision as of 23:46, 4 December 2008 by Rob (talk | contribs)
Jump to navigationJump to search

Context: HL Kit … Kit Reference 

Overview

Every script begins with an initial context that is dictated by the particular script. Quite often, though, you'll want to access information somewhere else within the data hierarchy. That's when context transitions come into play. A context transition allows you to move through the hierarchy, progressing to objects either above or below the current context. These transitions can be chained, allowing you to move through a sequence of contexts to reach the desired destination.

From within a given context, you are only able to transition to a specific set of other contexts. The sections below identify what the valid transitions are for each context.

NOTE! If transitions are utilized that result in an invalid (i.e. non-existent) context, any subsequent target reference will be invalid. If this occurs during run-time, the operation will be ignored and the target identifier will return zero. A suitable error will generally be displayed, but not always. An example of an invalid context is when a pick attempts to transition to a field that does not exist within that pick.

Using "this"

Container Context

From within a "container" context, you can utilize the following set of valid context transitions:

Hero Context

From within a "hero" context, you can utilize the following set of valid context transitions:

Pick Context

From within a "pick" context, you can utilize the following set of valid context transitions:

Thing Context

From within a "thing" context, you can utilize the following set of valid context transitions:

Field Context

From within a "field" context, you can utilize the following set of valid context transitions:

Pool Context

From within a "pool" context, you can utilize the following set of valid context transitions:

Scene Context

From within a "scene" context, you can utilize the following set of valid context transitions:

Layout Context

From within a "layout" context, you can utilize the following set of valid context transitions:

Template Context

From within a "template" context, you can utilize the following set of valid context transitions:

Portal Context

From within a "portal" context, you can utilize the following set of valid context transitions:

Value Context

From within a "value" context, you can utilize the following set of valid context transitions:

State Context

From within a "state" context, you can utilize the following set of valid context transitions:

Special Contexts

From within a "container" context, you can utilize the following set of valid context transitions: