Enumeration: Difference between revisions
Jump to navigation
Jump to search
m (OK I guess someone is working on this :P) |
mNo edit summary |
||
| (5 intermediate revisions by 3 users not shown) | |||
| Line 1: | Line 1: | ||
[[Category:AI | [[Category:AI Programming]] | ||
{{stub}} | {{stub}} | ||
''These enumerations pertain only to [[Response System]] scripting and is not meant for use anywhere else:'' | |||
Enumeration declares an enumerated type so that comparisons can be matched against the string versions of the type. | Enumeration declares an enumerated type so that comparisons can be matched against the string versions of the type. | ||
| Line 9: | Line 11: | ||
} | } | ||
The code and criteria refer to enumerations with square brackets and a double colon separator, e.g.: | The code and criteria refer to enumerations with square brackets and a double colon separator, e.g.: | ||
[ | [NPCState::Idle] | ||
In <code>response_rules.txt</code>, enumeration is used to represent NPC States. | In <code>response_rules.txt</code>, enumeration is used to represent NPC States. | ||
Latest revision as of 17:14, 10 June 2006
These enumerations pertain only to Response System scripting and is not meant for use anywhere else:
Enumeration declares an enumerated type so that comparisons can be matched against the string versions of the type.
enumeration "UniqueName"
{
"key1" "value1"
"key2" "value2"
}
The code and criteria refer to enumerations with square brackets and a double colon separator, e.g.: [NPCState::Idle]
In response_rules.txt, enumeration is used to represent NPC States.
enumeration "NPCState"
{
"None" "0"
"Idle" "1"
"Alert" "2"
"Combat" "3"
"Scripted" "4"
"PlayDead" "5"
"Dead" "6"
}