Spriteflags: Difference between revisions

From EDukeWiki
Jump to navigation Jump to search
m xref to htflags
No edit summary
Line 1: Line 1:
Inside actor, state, and event code,<br />
'''spriteflags''' <value>
'''spriteflags''' <value>
 
sets the [[htflags]] value for the current sprite.
Sets special flags for sprites. The values are:
 
'''1'''  - Generates a shadow. See [[spriteshadow]].<br />
'''2'''  - Turns [[spritepal|palette]] 6 whenever night vision goggles are used. See [[spritenvg]].<br />
'''4'''  - The sprite's shade is unaffected by the shade of its sector. See [[spritenoshade]].<br />
'''8'''  - Is a [[defineprojectile|projectile]].<br />
'''16''' - Prevents teleporting. The sprite is not entered into the [[decal deletion queue]].<br />
'''32''' - Is an enemy. See [[useractor]], but note that this is distinct from setting the useractor type to either of the enemy types.<br />
'''64''' - Sprite will be insusceptible to floor palette of sector containing this sprite. See [[spritenopal]].<br />
'''2048''' - Sprite will skip x/y "clipmove()" . This skips objects checking for collisions with other actors to increase performance. Useful for particle effects.
 
It is a [[bitfield]], so add together the values you want and then use spriteflags with the sum.
 


Outside of actors and states,<br/>
Outside of actors and states,<br/>
'''spriteflags''' <picnum> <value> <br/>
'''spriteflags''' <picnum> <value> <br/>
sets the same flags per-tile. When a flag is checked, the per-tile value is XORed with the per-sprite value, i.e. one reverses the other.
sets the same flags per-tile. When a flag is checked, the per-tile value is XORed with the per-sprite value, i.e. one reverses the other.
Flags that are not explicitly listed may be reserved for internal use.<br/>
The actor member [[htflags]] is modified with the first form of this command.
[[Category:Bitfields]]
[[Category:Bitfields]]
[[Category:EDuke32 specific commands]]
[[Category:EDuke32 specific commands]]
[[Category:Sprite manipulation]]
[[Category:Sprite manipulation]]

Revision as of 15:08, 1 January 2012

Inside actor, state, and event code,
spriteflags <value> sets the htflags value for the current sprite.

Outside of actors and states,
spriteflags <picnum> <value>
sets the same flags per-tile. When a flag is checked, the per-tile value is XORed with the per-sprite value, i.e. one reverses the other.