vPumpkinG
January 27th, 2020, 17:47
Hello, i'm trying to access the value of the modifier stack just before the throwing dice animation happens.
I have this script:
function getRoll(rActor, sAbilityStat, vCantidadDados)
local rRoll = {};
local dMod = 0;
--I need the value of the stack here as a number, say, dMod = -2
local dados = d6s(vCantidadDados + dMod );
rRoll.sType = "ability";
rRoll.aDice = dados;
rRoll.nMod = 0;
rRoll.sDesc = StringManager.capitalize(sAbilityStat);
rRoll.sDesc = rRoll.sDesc .. ": ";
return rRoll;
end
The idea is to pass the modifier to the function that populates aDice so it can increase/decrease the amount of dice to throw.
What'd be the best way to do this?
Thanks in advance.
I have this script:
function getRoll(rActor, sAbilityStat, vCantidadDados)
local rRoll = {};
local dMod = 0;
--I need the value of the stack here as a number, say, dMod = -2
local dados = d6s(vCantidadDados + dMod );
rRoll.sType = "ability";
rRoll.aDice = dados;
rRoll.nMod = 0;
rRoll.sDesc = StringManager.capitalize(sAbilityStat);
rRoll.sDesc = rRoll.sDesc .. ": ";
return rRoll;
end
The idea is to pass the modifier to the function that populates aDice so it can increase/decrease the amount of dice to throw.
What'd be the best way to do this?
Thanks in advance.