Pattern script
From Blood Wiki
(Difference between revisions)
(→Introduction) |
(→Operators) |
||
Line 24: | Line 24: | ||
| Expression | | Expression | ||
| align=center | 6 | | align=center | 6 | ||
− | | align=center | '''>''' | + | | align=center | '''x > y ''' |
| Greater | | Greater | ||
+ | | align=center | 11 | ||
+ | | align=center | '''x >< start end ''' | ||
+ | | x > start And x < end | ||
|- | |- | ||
| align=center | 2 | | align=center | 2 | ||
− | | align=center | '''&''' | + | | align=center | '''x & y''' |
| Logical 'And' | | Logical 'And' | ||
| align=center | 7 | | align=center | 7 | ||
− | | align=center | '''>=''' | + | | align=center | '''x >= y''' |
| Greater or equal | | Greater or equal | ||
+ | | align=center | 12 | ||
+ | | align=center | '''x =>< start end ''' | ||
+ | | x >= start And x < end | ||
|- | |- | ||
| align=center | 3 | | align=center | 3 | ||
− | | align=center | '''|''' | + | | align=center | '''x | y''' |
| Logical 'Or' | | Logical 'Or' | ||
| align=center | 8 | | align=center | 8 | ||
− | | align=center | '''<''' | + | | align=center | '''x < y''' |
| Lesser | | Lesser | ||
+ | | align=center | 13 | ||
+ | | align=center | '''x ><= start end ''' | ||
+ | | x > start And x <= end | ||
|- | |- | ||
| align=center | 4 | | align=center | 4 | ||
− | | align=center | '''=''' | + | | align=center | '''x = y''' |
| Equal | | Equal | ||
| align=center | 9 | | align=center | 9 | ||
− | | align=center | '''<=''' | + | | align=center | '''x <= y''' |
| Lesser or equal | | Lesser or equal | ||
+ | | align=center | 14 | ||
+ | | align=center | '''x =><= start end ''' | ||
+ | | x >= start And x <= end | ||
|- | |- | ||
| align=center | 5 | | align=center | 5 | ||
− | | align=center | '''!=''' | + | | align=center | '''x != y''' |
| Not equal | | Not equal | ||
| align=center | 10 | | align=center | 10 | ||
− | | align=center | '''not''' | + | | align=center | '''x & not y''' |
| Logical Not | | Logical Not | ||
|} | |} |
Revision as of 02:32, 3 July 2012
Introduction
Pattern scripts is special kind of expressions that returns 1 or 0. Pattern scripts are used to determine availability of some functionality or event.
Pattern scripts are used:
- By monsters to check if its a time to spawn/hide
- By gamemodels to check if could be damaged by certain weapon
Operators
# | Operator | Description | # | Operator | Description | # | Operator | Description |
---|---|---|---|---|---|---|---|---|
1 | ( expression ) | Expression | 6 | x > y | Greater | 11 | x >< start end | x > start And x < end |
2 | x & y | Logical 'And' | 7 | x >= y | Greater or equal | 12 | x =>< start end | x >= start And x < end |
3 | x | y | Logical 'Or' | 8 | x < y | Lesser | 13 | x ><= start end | x > start And x <= end |
4 | x = y | Equal | 9 | x <= y | Lesser or equal | 14 | x =><= start end | x >= start And x <= end |
5 | x != y | Not equal | 10 | x & not y | Logical Not |