setTablePickOnce: Difference between revisions
Jump to navigation
Jump to search
m (Conversion script moved page SetTablePickOnce to setTablePickOnce: Converting page titles to lowercase) |
No edit summary |
||
(One intermediate revision by the same user not shown) | |||
Line 6: | Line 6: | ||
Sets a table as ''Pick Once''. The individual entries in a ''Pick Once'' table can only be randomly chosen once until the table is reset with the {{func|resetTablePicks}} function. This can be used to simulate a deck of cards where a card picked is no longer available for future picks until the deck is re-shuffled. | Sets a table as ''Pick Once''. The individual entries in a ''Pick Once'' table can only be randomly chosen once until the table is reset with the {{func|resetTablePicks}} function. This can be used to simulate a deck of cards where a card picked is no longer available for future picks until the deck is re-shuffled. | ||
|usage= | |usage= | ||
< | <syntaxhighlight lang="mtmacro" line> | ||
setTablePickOnce(tableName, boolean) | setTablePickOnce(tableName, boolean) | ||
</ | </syntaxhighlight> | ||
'''Parameters''' | '''Parameters''' | ||
{{param|tableName|A string containing the name of the Table.}} | {{param|tableName|A string containing the name of the Table.}} | ||
{{param|boolean|Pass a{{code|1}} to flag a table as ''Pick Once''. Pass a {{code|0}} to change table back to normal. }} | {{param|boolean|Pass a{{code|1}} to flag a table as ''Pick Once''. Pass a {{code|0}} to change table back to normal. }} | ||
|examples= | |examples= | ||
< | <syntaxhighlight lang="mtmacro" line> | ||
[r:setTablePickOnce("test",1)] | [r:setTablePickOnce("test",1)] | ||
</ | </syntaxhighlight> | ||
'''Result:''' Table is set as ''Pick Once''. | '''Result:''' Table is set as ''Pick Once''. | ||
|also= | |also= |
Latest revision as of 23:59, 14 March 2023
setTablePickOnce() Function
Note: This function can only be used in a Trusted Macro
• Introduced in version 1.6.0
Sets a table as Pick Once. The individual entries in a Pick Once table can only be randomly chosen once until the table is reset with the resetTablePicks() function. This can be used to simulate a deck of cards where a card picked is no longer available for future picks until the deck is re-shuffled.
Usage
setTablePickOnce(tableName, boolean)
Parameters
tableName
- A string containing the name of the Table.boolean
- Pass a1
to flag a table as Pick Once. Pass a0
to change table back to normal.
Examples
[r:setTablePickOnce("test",1)]