setTablePickOnce: Difference between revisions

From RPTools Wiki
Jump to navigation Jump to search
(Created page with "{{MacroFunction |name=setTablePickOnce |version=1.6.0 |trusted=true |description= Sets a table as ''Pick Once''. The individual entries in a ''Pick Once'' table can only be r...")
 
No edit summary
Line 4: Line 4:
|trusted=true
|trusted=true
|description=
|description=
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.
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=
<source lang="mtmacro" line>
<source lang="mtmacro" line>

Revision as of 15:53, 10 March 2020

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 a 0 to change table back to normal.

Examples

[r:setTablePickOnce("test",1)]
Result: Table is set as Pick Once.

See Also