Picnum

From EDukeWiki
Revision as of 22:34, 11 June 2006 by DeeperThought (talk | contribs)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

picnum is the (.art) tile number of the sprite. 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 is thereby a PIGCOP (because the string '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.