Pattern script
From Blood Wiki
(Difference between revisions)
(→Operators) |
(→Operators) |
||
Line 10: | Line 10: | ||
{| border=1 cellspacing=0 cellpadding=3 style="border-collapse: collapse" width=100% | {| border=1 cellspacing=0 cellpadding=3 style="border-collapse: collapse" width=100% | ||
− | ! width=1% | # | + | ! width=1% | # |
− | ! width=3% | Operator | + | ! width=3% | Operator |
! width=10% | Description | ! width=10% | Description | ||
− | ! width=1% | # | + | ! width=1% | # |
− | ! width=3% | Operator | + | ! width=3% | Operator |
! width=10% | Description | ! width=10% | Description | ||
− | ! width=1% | # | + | ! width=1% | # |
− | ! width=3% | Operator | + | ! width=3% | Operator |
! width=10% | Description | ! width=10% | Description | ||
|- | |- | ||
− | | 1 | + | | align=center | 1 |
| '''(''' ''expression'' ''')''' | | '''(''' ''expression'' ''')''' | ||
| Expression | | Expression | ||
− | | 6 | + | | align=center | 6 |
| '''>''' | | '''>''' | ||
| Greater | | Greater | ||
|- | |- | ||
− | | 2 | + | | align=center | 2 |
| '''&''' | | '''&''' | ||
| Logic 'And' | | Logic 'And' | ||
− | | 7 | + | | align=center | 7 |
| '''>=''' | | '''>=''' | ||
| Greater or equal | | Greater or equal | ||
|- | |- | ||
− | | 3 | + | | align=center | 3 |
| '''|''' | | '''|''' | ||
| Logical 'Or' | | Logical 'Or' | ||
− | | 8 | + | | align=center | 8 |
| '''<''' | | '''<''' | ||
| Lesser | | Lesser | ||
|- | |- | ||
− | | 4 | + | | align=center | 4 |
| '''=''' | | '''=''' | ||
| Equal | | Equal | ||
− | | 9 | + | | align=center | 9 |
| '''<=''' | | '''<=''' | ||
| Lesser or equal | | Lesser or equal | ||
|- | |- | ||
− | | 5 | + | | align=center | 5 |
| '''!=''' | | '''!=''' | ||
| Not equal | | Not equal | ||
− | | 10 | + | | align=center | 10 |
| '''not''' | | '''not''' | ||
| Logical not | | Logical not | ||
|} | |} |
Revision as of 02:25, 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 | & | Logic 'And' | 7 | >= | Greater or equal | |||
3 | Logical 'Or' | 8 | < | Lesser | ||||
4 | = | Equal | 9 | <= | Lesser or equal | |||
5 | != | Not equal | 10 | not | Logical not |