Digitalnumber: Difference between revisions
Jump to navigation
Jump to search
mNo edit summary |
mNo edit summary |
||
Line 17: | Line 17: | ||
Example code: | Example code: | ||
<pre> | |||
setvar x 300 | setvar x 300 | ||
setvar y 10 | setvar y 10 | ||
setvar shade 0 | setvar shade 0 | ||
setvar pal 0 | setvar pal 0 | ||
setvar tilenum DIGITALNUM | setvar tilenum DIGITALNUM | ||
setvar orientation 26 | setvar orientation 26 | ||
getactor[THISACTOR].extra TEMP | getactor[THISACTOR].extra TEMP | ||
digitalnumber tilenum x y TEMP shade pal orientation ZERO ZERO xdim ydim | digitalnumber tilenum x y TEMP shade pal orientation ZERO ZERO xdim ydim | ||
</pre> | |||
Please note that as with [[gametext]], [[minitext]] and friends, digitalnumber only works during [[events]]. | Please note that as with [[gametext]], [[minitext]] and friends, digitalnumber only works during [[events]]. |
Revision as of 00:59, 7 September 2005
digitalnumber <tilenum> <x> <y> <number> <shade> <pal> <orientation> <x1> <y1> <x2> <y2>
Prints a number to the screen using a function similar to that which prints the health and ammo counters in the HUD.
<tilenum> is the first tile of a sequence of numbers ordered from 0-9. See tile 2472 for an example.
<x> and <y> are on-screen coordinates.
<number> is the gamevar to print the value from.
<shade> and <pal> are obviously shade and palette.
<orientation> is.. hard to explain. Play with values like 16 and 26.
<x1>, <y1>, <x2> and <y2> are boundaries on the screen that define where the number may be drawn.
Example code:
setvar x 300 setvar y 10 setvar shade 0 setvar pal 0 setvar tilenum DIGITALNUM setvar orientation 26 getactor[THISACTOR].extra TEMP digitalnumber tilenum x y TEMP shade pal orientation ZERO ZERO xdim ydim
Please note that as with gametext, minitext and friends, digitalnumber only works during events.