Denizen Script Tags


Tags are always written with a <between these marks>, and are critical to scripts, as the primary way to read data.
Learn about how tags work in The Beginner's Guide.


Showing 1 out of 2437 tags...
Name<ListTag.random[(<#>)]>
ReturnsObjectTag
DescriptionGets a random item in the list and returns it.
Optionally, add [<#>] to instead get a list of multiple randomly chosen list entries.
Example
# Narrates EITHER "one" OR "two" - different each time!
- narrate "<list[one|two].random>
Example
# Could narrate "one|two", "two|three", OR "one|three" - different each time!
- narrate "<list[one|two|three].random[2]>
Example
# Could narrate "one|two|three", "one|three|two", "two|one|three", "two|three|one", "three|two|one", OR "three|one|two" - different each time!
- narrate "<list[one|two|three].random[9999]>
Sourcehttps://github.com/DenizenScript/Denizen-Core/blob/master/src/main/java/com/denizenscript/denizencore/objects/core/ListTag.java#L2692