Difference between revisions of "Context Transitions"

From HLKitWiki
Jump to: navigation, search
(New page: {{context|Kit Reference}} ==Overview==)
 
Line 2: Line 2:
  
 
==Overview==
 
==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:
 +
 +
:{| class="infotable"
 +
|class="leftnormal"|
 +
|
 +
|-
 +
|
 +
|
 +
|-
 +
|
 +
|
 +
|-
 +
|}
 +
 +
==Hero Context==
 +
 +
From within a "hero" context, you can utilize the following set of valid context transitions:
 +
 +
:{| class="infotable"
 +
|class="leftnormal"|
 +
|
 +
|-
 +
|
 +
|
 +
|-
 +
|
 +
|
 +
|-
 +
|}
 +
 +
==Pick Context==
 +
 +
From within a "pick" context, you can utilize the following set of valid context transitions:
 +
 +
:{| class="infotable"
 +
|class="leftnormal"|
 +
|
 +
|-
 +
|
 +
|
 +
|-
 +
|
 +
|
 +
|-
 +
|}
 +
 +
==Thing Context==
 +
 +
From within a "thing" context, you can utilize the following set of valid context transitions:
 +
 +
:{| class="infotable"
 +
|class="leftnormal"|
 +
|
 +
|-
 +
|
 +
|
 +
|-
 +
|
 +
|
 +
|-
 +
|}
 +
 +
==Field Context==
 +
 +
From within a "field" context, you can utilize the following set of valid context transitions:
 +
 +
:{| class="infotable"
 +
|class="leftnormal"|
 +
|
 +
|-
 +
|
 +
|
 +
|-
 +
|
 +
|
 +
|-
 +
|}
 +
 +
==Pool Context==
 +
 +
From within a "pool" context, you can utilize the following set of valid context transitions:
 +
 +
:{| class="infotable"
 +
|class="leftnormal"|
 +
|
 +
|-
 +
|
 +
|
 +
|-
 +
|
 +
|
 +
|-
 +
|}
 +
 +
==Scene Context==
 +
 +
From within a "scene" context, you can utilize the following set of valid context transitions:
 +
 +
:{| class="infotable"
 +
|class="leftnormal"|
 +
|
 +
|-
 +
|
 +
|
 +
|-
 +
|
 +
|
 +
|-
 +
|}
 +
 +
==Layout Context==
 +
 +
From within a "layout" context, you can utilize the following set of valid context transitions:
 +
 +
:{| class="infotable"
 +
|class="leftnormal"|
 +
|
 +
|-
 +
|
 +
|
 +
|-
 +
|
 +
|
 +
|-
 +
|}
 +
 +
==Template Context==
 +
 +
From within a "template" context, you can utilize the following set of valid context transitions:
 +
 +
:{| class="infotable"
 +
|class="leftnormal"|
 +
|
 +
|-
 +
|
 +
|
 +
|-
 +
|
 +
|
 +
|-
 +
|}
 +
 +
==Portal Context==
 +
 +
From within a "portal" context, you can utilize the following set of valid context transitions:
 +
 +
:{| class="infotable"
 +
|class="leftnormal"|
 +
|
 +
|-
 +
|
 +
|
 +
|-
 +
|
 +
|
 +
|-
 +
|}
 +
 +
==Value Context==
 +
 +
From within a "value" context, you can utilize the following set of valid context transitions:
 +
 +
:{| class="infotable"
 +
|class="leftnormal"|
 +
|
 +
|-
 +
|
 +
|
 +
|-
 +
|
 +
|
 +
|-
 +
|}
 +
 +
==State Context==
 +
 +
From within a "state" context, you can utilize the following set of valid context transitions:
 +
 +
:{| class="infotable"
 +
|class="leftnormal"|
 +
|
 +
|-
 +
|
 +
|
 +
|-
 +
|
 +
|
 +
|-
 +
|}
 +
 +
==Special Contexts==
 +
 +
From within a "container" context, you can utilize the following set of valid context transitions:
 +
 +
:{| class="infotable"
 +
|class="leftnormal"|
 +
|
 +
|-
 +
|
 +
|
 +
|-
 +
|
 +
|
 +
|-
 +
|}

Revision as of 16:46, 4 December 2008

Context: HL KitKit 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: