Spriteflags: Difference between revisions

From EDukeWiki
Jump to navigation Jump to search
add second (per-tile) form of 'spriteflags'
Mblackwell (talk | contribs)
mNo edit summary
Line 10: Line 10:
'''32''' - Is an enemy. See [[useractor]], but note that this is distinct from setting the useractor type to either of the enemy types.<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 />
'''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 affects.
It is a [[bitfield]], so add together the values you want and then use spriteflags with the sum.
It is a [[bitfield]], so add together the values you want and then use spriteflags with the sum.



Revision as of 20:28, 17 December 2011

spriteflags <value>

Sets special flags for sprites. The values are:

1 - Generates a shadow. See spriteshadow.
2 - Turns palette 6 whenever night vision goggles are used. See spritenvg.
4 - The sprite's shade is unaffected by the shade of its sector. See spritenoshade.
8 - Is a projectile.
16 - Prevents teleporting. The sprite is not entered into the decal deletion queue.
32 - Is an enemy. See useractor, but note that this is distinct from setting the useractor type to either of the enemy types.
64 - Sprite will be insusceptible to floor palette of sector containing this sprite. See spritenopal.
2048 - Sprite will skip x/y "clipmove()" . This skips objects checking for collisions with other actors to increase performance. Useful for particle affects. It is a bitfield, so add together the values you want and then use spriteflags with the sum.


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.