Digitalnumber: Difference between revisions

From EDukeWiki
Jump to navigation Jump to search
No edit summary
No edit summary
Line 5: Line 5:
<tilenum> is the first tile of a sequence of numbers ordered from 0-9.  See tile 2472 for an example.   
<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.
<x> X coordinate, ranged 0-320
 
<y> Y coordinate, ranged 0-200


<number> is the [[gamevar]] to print the value from.  
<number> is the [[gamevar]] to print the value from.  
Line 13: Line 15:
<[[orientation]]> Controls the way the sprite is drawn (see entry)   
<[[orientation]]> Controls the way the sprite is drawn (see entry)   


<x1>, <y1>, <x2> and <y2> are boundaries on the screen that define where the number may be drawn.
<x1>, <y1>, <x2> and <y2> are boundaries on the screen that define where the number may be drawn. The gamevars xdim  and ydim will hold the current screen resolution.


Example code:
Example code:

Revision as of 10:13, 8 January 2009

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> X coordinate, ranged 0-320

<y> Y coordinate, ranged 0-200

<number> is the gamevar to print the value from.

<shade> and <pal> are obviously shade and palette.

<orientation> Controls the way the sprite is drawn (see entry)

<x1>, <y1>, <x2> and <y2> are boundaries on the screen that define where the number may be drawn. The gamevars xdim and ydim will hold the current screen resolution.

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.