Picnum: Difference between revisions

From EDukeWiki
Jump to navigation Jump to search
No edit summary
Fox (talk | contribs)
No edit summary
 
Line 1: Line 1:
'''picnum''' is a member of the sprite and wall structures.
For related members of other structures, see [[overpicnum]], [[floorpicnum]], and [[ceilingpicnum]].
A '''picnum''', short for "picture number", also referred to as '''tilenum''', short for "tile number", is the index of any piece of art in the game.  In CON coding, since [[actor]] types are defined by tile number, the picnum of a sprite determines the code that will be executed on it.  For example, any sprite that is given a picnum of 2000 in the code or in a map is thereby a PIGCOP (because the label 'PIGCOP' is defined as 2000) and will then execute the associated code.
A '''picnum''', short for "picture number", also referred to as '''tilenum''', short for "tile number", is the index of any piece of art in the game.  In CON coding, since [[actor]] types are defined by tile number, the picnum of a sprite determines the code that will be executed on it.  For example, any sprite that is given a picnum of 2000 in the code or in a map is thereby a PIGCOP (because the label 'PIGCOP' is defined as 2000) and will then execute the associated code.


In the code of a specific [[actor]] type, the picnum of the sprite executing the code is already known.  But in certain events, such as [[EVENT_GAME]], different actor types will execute the same [[onevent]] code, so getting the value of picnum can be very useful.
In the code of a specific [[actor]] type, the picnum of the sprite executing the code is already known.  But in certain events, such as [[EVENT_GAME]], different actor types will execute the same [[onevent]] code, so getting the value of picnum can be very useful.
'''picnum''' is a member of the sprite and wall structures.  For related members of other structures, see [[overpicnum]], [[floorpicnum]], and [[ceilingpicnum]].


[[Category:Sprite structure members]]
[[Category:Sprite structure members]]
[[Category:Wall structure members]]
[[Category:Wall structure members]]

Latest revision as of 08:55, 22 February 2020

picnum is a member of the sprite and wall structures.

For related members of other structures, see overpicnum, floorpicnum, and ceilingpicnum.

A picnum, short for "picture number", also referred to as tilenum, short for "tile number", is the index of any piece of art in the game. In CON coding, since actor types are defined by tile number, the picnum of a sprite determines the code that will be executed on it. For example, any sprite that is given a picnum of 2000 in the code or in a map is thereby a PIGCOP (because the label 'PIGCOP' is defined as 2000) and will then execute the associated code.

In the code of a specific actor type, the picnum of the sprite executing the code is already known. But in certain events, such as EVENT_GAME, different actor types will execute the same onevent code, so getting the value of picnum can be very useful.