...
There are sixteen instances of three types of uniform.
| Uniform Name | Type |
|---|---|
| scriptableInt<n> | Signed 32-bit Integer |
| scriptableFloat<n> | Signed 32-bit Single Precision Float |
| scriptableVec<n> | Four-part Signed 32-bit Float Vector |
In each variable name <n> is equal to a number 1 to 16 and corresponds to NwScript constants SHADER_UNIFORM_*
...
| Code Block |
|---|
//check if flag 2 is set
if ( GetIsFlagSet(scriptableInt1, MY_BITFLAG2) ){
//do something here
}
//check if both flag 1 and 2 are set
if ( GetIsFlagSet(scriptableInt1, (MY_BITFLAG1 + MY_BITFLAG2)) ){
//do something here
}
//check if either flag 1 or flag 2 is set
//check if both flag 1 and 2 are set
if ( GetIsFlagSet(scriptableInt1, MY_BITFLAG1) || GetIsFlagSet(scriptableInt1, MY_BITFLAG2)){
//do something here
} |
...