-
Notifications
You must be signed in to change notification settings - Fork 22
Open
Description
Now it is needed to put the await command in front of the rolls and correct the path which the text is inside the data object now.
/*
* Examples for using roll tables
* Examples assume existence of a basic roll table
* called "Months" that contains text entries
*/
// Roll table and output to chat
game.tables.getName('Months').draw();
// Roll table and store result for later use
let roll = await game.tables.getName('Months').roll();
// Roll table and send custom chat with result
let draw = await game.tables.getName('Months').roll();
let month = draw.results[0].data.text;
ChatMessage.create({ content: `The month is: ${month}`});
Metadata
Metadata
Assignees
Labels
No labels