Paul Pratt
July 14th, 2016, 05:46
More work on the Dark Heresy rules.
I have a situation where a roll could be from 1 to 6 d10's depending on the situation. If one of the die turn up a "9" then I would like a message to be displayed.
I know how to capture a die in a fixed roll. Using that as a starting point I am this far. If I replace the "x" below with a number...say 2, whenever the 2nd die results in a 9 the message is displayed. I need to capture and check each die for a 9. Not sure how to do that. Any help out there?
local nResult = rRoll.aDice["x"].result;
if nResult == 9 then
rMessage.text = rMessage.text .. " -->Perils of the Warp!<-- "
end
Thanks - Paul
I have a situation where a roll could be from 1 to 6 d10's depending on the situation. If one of the die turn up a "9" then I would like a message to be displayed.
I know how to capture a die in a fixed roll. Using that as a starting point I am this far. If I replace the "x" below with a number...say 2, whenever the 2nd die results in a 9 the message is displayed. I need to capture and check each die for a 9. Not sure how to do that. Any help out there?
local nResult = rRoll.aDice["x"].result;
if nResult == 9 then
rMessage.text = rMessage.text .. " -->Perils of the Warp!<-- "
end
Thanks - Paul