statik37
November 28th, 2019, 02:16
Hello,
I am trying to set up a custom dice display in the chat. I have included my custom icons, and used the Mutant extension as my base to write the code. The problem I'm having is, when I roll a d6, whenever I roll a 3 or 4, I want it to show a blank dice with no number. All other rolls, I have set up custom icons.
I went ahead and installed all 6 icons, two blanks for the 3 and 4. When I roll a 1, 2, 5, and 6 roll and display the custom icons. When a 3 or 4 are rolled, it displays the icon with the standard number on it. I know that comm.deliverChatMessage(rMessage); Is taking the value from dice.result, and displaying that in the chat box on top of the icon. How do I turn that off? I tried putting an if statement in that said if 3 or 4 are rolled, dice.result = 0, but that shows a zero. when I set dice.result to either " " or nil, hoping that would do it, the result is a -1 on the dice face. What can I do to not have the image show up without the number superimposed on it?
I am trying to set up a custom dice display in the chat. I have included my custom icons, and used the Mutant extension as my base to write the code. The problem I'm having is, when I roll a d6, whenever I roll a 3 or 4, I want it to show a blank dice with no number. All other rolls, I have set up custom icons.
I went ahead and installed all 6 icons, two blanks for the 3 and 4. When I roll a 1, 2, 5, and 6 roll and display the custom icons. When a 3 or 4 are rolled, it displays the icon with the standard number on it. I know that comm.deliverChatMessage(rMessage); Is taking the value from dice.result, and displaying that in the chat box on top of the icon. How do I turn that off? I tried putting an if statement in that said if 3 or 4 are rolled, dice.result = 0, but that shows a zero. when I set dice.result to either " " or nil, hoping that would do it, the result is a -1 on the dice face. What can I do to not have the image show up without the number superimposed on it?