tableImage: Difference between revisions
Jump to navigation
Jump to search
Verisimilar (talk | contribs) (Updated formatting, , added version, clarified the size parameter in usage text, added See Also links.) |
Verisimilar (talk | contribs) m (Fixed typo in usage.) |
||
Line 7: | Line 7: | ||
|usage= | |usage= | ||
<source lang="mtmacro" line> | <source lang="mtmacro" line> | ||
tableImage(name) | tableImage(name) | ||
</source> | </source> | ||
<source lang="mtmacro" line> | <source lang="mtmacro" line> | ||
tableImage(name, row) | tableImage(name, row) | ||
</source> | </source> | ||
<source lang="mtmacro" line> | <source lang="mtmacro" line> | ||
tableImage(name, row, size) | tableImage(name, row, size) | ||
</source> | </source> | ||
<source lang="mtmacro" line> | <source lang="mtmacro" line> | ||
tblImage(name) | tblImage(name) | ||
</source> | </source> | ||
<source lang="mtmacro" line> | <source lang="mtmacro" line> | ||
tblImage(name, row) | tblImage(name, row) | ||
</source> | </source> | ||
<source lang="mtmacro" line> | <source lang="mtmacro" line> | ||
tblImage(name, row, size) | tblImage(name, row, size) | ||
</source> | </source> | ||
'''Parameters''' | '''Parameters''' |
Revision as of 15:11, 9 March 2009
tableImage() Function
• Introduced in version 1.3b40
Gets the image asset value from the specified table. If the row is not specified then the default roll for the table is used.
Usage
tableImage(name)
tableImage(name, row)
tableImage(name, row, size)
tblImage(name)
tblImage(name, row)
tblImage(name, row, size)
Parameters
name
- A string containing the name of the table.row
- The row of the table that should have the image asset returned.size
- The size the image asset returned should be. If the image is not square, this will be the size of the height.
Examples
Example 1: Display a random image from table
"tbl1"
using default roll:
<image src='[r: tableImage("tbl1")]'></image>
Example 1: Display the first image from table "tbl1"
:
<image src='[r: tableImage("tbl1", 1)]'></image>
Example 2: Display one of the first four images, resized to 40
pixels tall, from "tbl1"
, chosed randomly:
<image src='[r: tableImage("tbl1", "1d4", 40)]'></image>