Statnum: Difference between revisions
TheMechanic (talk | contribs) m Added reference to changespritestat, also highlighted writing statnum 1024 is NOT the way to kill an object. |
Hendricks266 (talk | contribs) No edit summary |
||
Line 79: | Line 79: | ||
|} | |} | ||
It was once not suggested to manually change statnum via "''setactor[].statnum''" because it would not update the game's internal linked lists, causing oddball occurrences like sprites freezing in midair and general game state corruption. "''setactor[].statnum''" is an alias of [[changespritestat]] in newer versions of EDuke32, preventing this corruption from occurring. | |||
Unassigned status numbers are reserved for future EDuke32 features. Please ask the developers to allocate an official user statnum range for CON-side features, should this be desired. | Unassigned status numbers are reserved for future EDuke32 features. Please ask the developers to allocate an official user statnum range for CON-side features, should this be desired. | ||
[[Category:Sprite structure members]] | [[Category:Sprite structure members]] |
Revision as of 13:50, 31 January 2016
Statnums are used by the game internally to see whether something is an actor, player, projectile, etc, and then process it appropriately.
Name | Number | Description | |
---|---|---|---|
STAT_DEFAULT | 0 | Sprites that are not defined by the CON code as actors, and are not projectiles, etc, have a statnum of 0. (i.e. the floor texture sprites used to make up a sprite bridge) | |
STAT_ACTOR | 1 | Actors. Sprites with a statnum of 1 will execute the actor code that applies to their tile number in the CON scripts. | |
STAT_ZOMBIEACTOR | 2 | Sleepers. Sprites taking a break from code execution (e.g. a Pig Cop that has been left alone for long enough will revert to statnum 2, only waking up and going back to statnum 1 upon seeing the player again) | |
STAT_EFFECTOR | 3 | ||
STAT_PROJECTILE | 4 | Projectiles. This includes hardcoded projectiles like RPG, FREEZEBLAST, and SHRINKSPARK, as well as custom projectiles. It does not include hitscan projectiles (bullets), since those are not sprites that exist in the game world. (SHOTSPARK1, the sprite spawned by bullets, is not itself a projectile.) | |
STAT_MISC | 5 | ||
STAT_STANDABLE | 6 | On spawn, the following sprites have statnum 6: BOLT1+, SIDEBOLT1+, VIEWSCREEN, VIEWSCREEN2, CRANE, TRASH, WATERDRIP, WATERDRIPSPLASH, PLUG, WATERBUBBLEMAKER, MASTERSWITCH, DOORSHOCK, TREE1, TREE2, TIRE, CONE, BOX, FLOORFLAME, CEILINGSTEAM, OOZFILTER, CRACK1-CRACK4, FIREEXT, TOILETWATER.
A few other ones become STANDABLE on seeing the player (changing from ZOMBIEACTOR): RUBBERCAN, EXPLODINGBARREL, WOODENHORSE, HORSEONSIDE, CANWITHSOMETHING, CANWITHSOMETHING2-4, FIREBARREL, FIREVASE, NUKEBARREL, NUKEBARRELDENTED, NUKEBARRELLEAKED, TRIPBOMB. | |
STAT_LOCATOR | 7 | ||
STAT_ACTIVATOR | 8 | ||
STAT_TRANSPORT | 9 | ||
STAT_PLAYER | 10 | Player and Holoduke | |
STAT_FX | 11 | RESPAWN, MUSICANDSFX | |
STAT_FALLER | 12 | Decorative sprites that have a nonzero hitag to make them destructible are assigned to the FALLER statnum. | |
STAT_DUMMYPLAYER | 13 | ||
STAT_LIGHT | 14 | ||
TSPR_TEMP | 99 | A tspr will have this when it is a shadow cast by an actor. | |
STAT_MIRROREDACTOR | 100 | A tspr will have this when it is part of a mirror reflection. | |
MAXSTATUS | 1024 | A sprite id with this statnum is invalid, meaning that it has been deleted or just never existed in the map. Do NOT try to destroy a sprite by setting this value on it, instead use the killit command or else try setting the sprite's xrepeat to zero. |
It was once not suggested to manually change statnum via "setactor[].statnum" because it would not update the game's internal linked lists, causing oddball occurrences like sprites freezing in midair and general game state corruption. "setactor[].statnum" is an alias of changespritestat in newer versions of EDuke32, preventing this corruption from occurring.
Unassigned status numbers are reserved for future EDuke32 features. Please ask the developers to allocate an official user statnum range for CON-side features, should this be desired.