No such luck....
Code:
<portal
id="rollability"
style="actBig"
tiptext="Click to roll your ability scores.">
<action
action="trigger"
confirm="This will reroll your base attributes. Proceed?">
<trigger><![CDATA[
~declare variables that are used to communicate with our caller
var NumOfDice as number
var SizeOfDice as number
var total as number
var myVal as number
NumOfDice = 3
SizeOfDice = 6
~call DieRoll
var i as number
total = 0
for i = 1 to NumOfDice
total += random(SizeOfDice)
next
if (total <= 3) then
myVal = -2
elseif (total <= 5) then
myVal = -1
elseif (total <= 8) then
myVal = 0
elseif (total <= 11) then
myVal = 1
elseif (total <= 14) then
myVal = 2
elseif (total <= 17) then
myVal = 3
elseif (total <= 18) then
myVal = 4
endif
hero.child[abilAccuracy].field[trtBase].value = myVal
]]></trigger>
<buttontext><![CDATA[
@text = "Roll Abilities"
]]></buttontext>
</action>
</portal>
the trtBase field is defined as:
Code:
<field
id="trtBase"
name="Base Value"
type="derived"
persistence="full"
defvalue="0">
</field>
There is no change to the value in trtBase after confirming the trigger. (most of the content is in the DieRoll procedure, but as the
call DieRoll didn't seem to work, I moved the rest into the trigger directly.
Thing is, I'm not seeing a difference between what I have, and the same type of portal from the sample
In Play tab.