Pattern script
From Blood Wiki
(Difference between revisions)
(→Operators) |
(→Operators) |
||
Line 12: | Line 12: | ||
! width=1% | # | ! width=1% | # | ||
! width=3% | Operator | ! width=3% | Operator | ||
− | ! width=7% | Description | + | ! width=7% | Description |
! width=1% | # | ! width=1% | # | ||
! width=3% | Operator | ! width=3% | Operator | ||
− | ! width=7% | Description | + | ! width=7% | Description |
! width=1% | # | ! width=1% | # | ||
! width=3% | Operator | ! width=3% | Operator | ||
− | ! width=7% | Description | + | ! width=7% | Description |
|- | |- | ||
| align=center | 1 | | align=center | 1 | ||
Line 29: | Line 29: | ||
| align=center | 2 | | align=center | 2 | ||
| align=center | '''&''' | | align=center | '''&''' | ||
− | | | + | | Logical 'And' |
| align=center | 7 | | align=center | 7 | ||
| align=center | '''>=''' | | align=center | '''>=''' | ||
Line 53: | Line 53: | ||
| align=center | 10 | | align=center | 10 | ||
| align=center | '''not''' | | align=center | '''not''' | ||
− | | Logical | + | | Logical Not |
|} | |} |
Revision as of 02:26, 3 July 2012
Introduction
Pattern script 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 it could be hit by certain weapon
Operators
# | Operator | Description | # | Operator | Description | # | Operator | Description |
---|---|---|---|---|---|---|---|---|
1 | ( expression ) | Expression | 6 | > | Greater | |||
2 | & | Logical 'And' | 7 | >= | Greater or equal | |||
3 | | | Logical 'Or' | 8 | < | Lesser | |||
4 | = | Equal | 9 | <= | Lesser or equal | |||
5 | != | Not equal | 10 | not | Logical Not |