Ok, on an adjustment I have it set up on pChosen2 to selected a Damage Resistance from the drop down. No problem. But how do you get the name of the selected item?
I've tried the following:
field[pChosen2].chosen.field[livename].text
field[pChosen2].chosen.field[thingname].text
Is there way to get the name off the DamageRes.? where the ? is the element selected (i.e.; dtFire would give Fire)?
The adjustment I'm trying to create is on a cantrip Makeshift Wand. This cantrip turns a small, 1-handed , holdable item into a wand. The item can then fire a single bolt of elemental damage based on the choice you have made.
Basically the item's livename should look something like this:
Makeshift wand (2d6 fire damage).
What I keep getting is:
Makeshift wand (2d6 ???? damage).
Eval script Render, Priority: 10000
I've tried the following:
field[pChosen2].chosen.field[livename].text
field[pChosen2].chosen.field[thingname].text
Is there way to get the name off the DamageRes.? where the ? is the element selected (i.e.; dtFire would give Fire)?
The adjustment I'm trying to create is on a cantrip Makeshift Wand. This cantrip turns a small, 1-handed , holdable item into a wand. The item can then fire a single bolt of elemental damage based on the choice you have made.
Basically the item's livename should look something like this:
Makeshift wand (2d6 fire damage).
What I keep getting is:
Makeshift wand (2d6 ???? damage).

Eval script Render, Priority: 10000
~ If we're not enabled, get out now
doneif (field[pIsOn].value = 0)
~ If nothing's been chosen, get out now
doneif (field[pChosen].ischosen = 0)
~ If nothing's been chosen, get out now
doneif (field[pChosen2].ischosen = 0)
var iHD as number
var iDice as number
var sText as string
var sElement as string
iHD = #totallevelcount[]
if (iHD >= 17) then
iDice = 4
elseif (iHD >= 11) then
iDice = 3
elseif (iHD >= 5) then
iDice = 2
else
iDice = 1
endif
sElement = field[pChosen2].chosen.field[thingname].text
~sElement = right (sElement, length (sElement)-2)
sText = iDice & "d8 " & sElement & " damage."
field[pChosen].chosen.field[DescAppend].text = sText
field[pChosen].chosen.field[livename].text = "Makeshift wand (" & field[pChosen].chosen.field[thingname].text & ", " & sText & ")"