Spriteflags: Difference between revisions

From EDukeWiki
Jump to navigation Jump to search
mNo edit summary
Fox (talk | contribs)
No edit summary
Line 1: Line 1:
Inside actor, state, and event code, the command<br />
'''spriteflags''' <picnum> <value>
'''spriteflags''' <value><br />
sets the [[htflags]] value for the currently executing sprite.


Outside of actors, states, and events, the directive<br/>
'''spriteflags''' <value>
'''spriteflags''' <picnum> <value> <br/>
sets the default flags on a per-tile basis.


At game time, the per-tile value is XORed with the per-sprite value, i.e. the setting of one to "true" reverses the other.<br/>
The first form is used outside of an actor code. It will set special flags to a tile. The values are the same as [[gameflags]].
For a particular actor tile, the '''spriteflags''' directive should precede its actor definition, as well as uses of other '''sprite*''' flag modification directives.
 
The second form is used inside of an actor code. It will set special flags for a sprite that exists in the map. The values are the same as [[htflags]].
 
At game time, the per-tile value is XORed with the per-sprite value, i.e. the setting of one reverses the other.
 
The per-tile flags are also set by [[useractor]]. Meaning that the '''spriteflags''' should precede it, otherwise the values will be overwritten.
[[Category:Bitfields]]
[[Category:Bitfields]]
[[Category:EDuke32 specific commands]]
[[Category:EDuke32 specific commands]]
[[Category:Sprite manipulation]]
[[Category:Sprite manipulation]]

Revision as of 23:34, 19 February 2020

spriteflags <picnum> <value>

spriteflags <value>

The first form is used outside of an actor code. It will set special flags to a tile. The values are the same as gameflags.

The second form is used inside of an actor code. It will set special flags for a sprite that exists in the map. The values are the same as htflags.

At game time, the per-tile value is XORed with the per-sprite value, i.e. the setting of one reverses the other.

The per-tile flags are also set by useractor. Meaning that the spriteflags should precede it, otherwise the values will be overwritten.