Page 1 of 1

Sandbox: How to roll dice from code

Posted: 24 May 2018, 23:31
by HQ063
Hi, I have been playing with sandbox a little and I already read the documentation, but was unable to find how to roll a die from code. I know it's possible to let the user roll the dice, but I need to roll all the dice from a certain zone together and there is no property for allowing that on zones or panels. So I thought the best option is to do it from Sandbox Script but in this docs: http://en.doc.boardgamearena.com/SandboxScripts there is no reference to a method that allows to roll a die.
I'm pretty sure there must be some undocumented method but I haven't found the source code neither so I won't be able to discover the method name and parameters by myself.

Could anybody help me? Thanks!!

Re: Sandbox: How to roll dice from code

Posted: 25 May 2018, 10:04
by Een
Correct, we forgot to add an entry point in the scripting api for rolling dice. I have added roll and setDie entrypoints and updated the doc.

Thanks for the feedback!

Re: Sandbox: How to roll dice from code

Posted: 27 May 2018, 17:47
by HQ063
Thanks for the quick fix! :D