Sandbox: How to roll dice from code

Game development with Board Game Arena Studio
Post Reply
User avatar
HQ063
Posts: 10
Joined: 17 April 2016, 07:39

Sandbox: How to roll dice from code

Post 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!!
User avatar
Een
Posts: 3854
Joined: 16 June 2010, 19:52

Re: Sandbox: How to roll dice from code

Post 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!
User avatar
HQ063
Posts: 10
Joined: 17 April 2016, 07:39

Re: Sandbox: How to roll dice from code

Post by HQ063 »

Thanks for the quick fix! :D
Post Reply

Return to “Developers”