PDA

View Full Version : Trapping when a hotkey rolls dice



peterb
December 9th, 2010, 22:11
I'm in the process of by-passing FG's 3D-animated dice rolls. My gaming group grew annoyed with the time it took to get the result of a die roll so I came up with a way of by-passing the animation and show the die roll result (almost) instantly. The only remaining problem is that hotkeys always rolls the dice. I'd like to trap when a hotkey rolls dice in the chat window. You can trap a dropped dice by using the onDrop event but how do you trap a hotkey?

Zeus
December 10th, 2010, 00:36
Take a look at the Library page on the Interface built in Package here (https://www.fantasygrounds.com/refdoc/Interface.xcp)

You want to take a look at methods onHotKeyActivated(), onHotKeyDrop() and onHotkeyActivated().

peterb
December 13th, 2010, 09:16
Take a look at the Library page on the Interface built in Package here (https://www.fantasygrounds.com/refdoc/Interface.xcp)

You want to take a look at methods onHotKeyActivated(), onHotKeyDrop() and onHotkeyActivated().


Thanks! I got it working now...

SpudmanWP
December 15th, 2010, 22:16
You also might want to take a look at the calculator.ext as it does not show dice and automatically shows the total.