jkeller
December 1st, 2025, 05:16
Hi. I'm developing a 5E extension, and I'm having trouble figuring out who the roller is when dice are "manually" rolled.
I've added handlers for lots of different types of rolls, and most work fine.
ActionsManager.registerPostRollHandler("dice", postRoll);
But for some reason, when the "dice" handler is called (when a player uses the dice at the bottom of the screen as opposed to clicking on a button to roll), the rSource parameter is nil (although the dice parameter is valid). I assume this is because the source (e.g. character) is unknown, since a player may be using 0 or multiple characters.
Is there any way for me to programmatically determine which client rolled? ... and maybe from there get the character(s) that client is controlling?
(The handler is called on the client.)
Thanks!
I've added handlers for lots of different types of rolls, and most work fine.
ActionsManager.registerPostRollHandler("dice", postRoll);
But for some reason, when the "dice" handler is called (when a player uses the dice at the bottom of the screen as opposed to clicking on a button to roll), the rSource parameter is nil (although the dice parameter is valid). I assume this is because the source (e.g. character) is unknown, since a player may be using 0 or multiple characters.
Is there any way for me to programmatically determine which client rolled? ... and maybe from there get the character(s) that client is controlling?
(The handler is called on the client.)
Thanks!