I've made some test to implement dice to my Tactical Console (unfortunately Dice roller works with successes above given value instead of equal and below, which I need) with result giving me random numbers, but each time I am making some changes.
So I try to make a trigger which will perform this task, but right now it doesn't work.
My prototype:
With acDie defined in Actor:
And I've got such error:
Is it possible to make it work? I didn't found much about implementation of random on the forum or the wiki.
So I try to make a trigger which will perform this task, but right now it doesn't work.
My prototype:
Code:
<portal
id="attack"
style="actReroll"
tiptext="Atak">
<action
action="trigger">
<trigger><![CDATA[
var temp as number
temp = random(10) + 1
~herofield[acAbandon].value = 1
perform herofield[acDie].value = 0
~ perform field[trkUser].reset
]]></trigger>
</action>
</portal>
With acDie defined in Actor:
Code:
<field
id="acDie"
name="Die"
type="user"
defvalue="0">
</field>
And I've got such error:
Code:
Syntax error in 'trigger' script for Template 'tacPick' (in Portal 'attack') on line 5
-> Error in string expression
Is it possible to make it work? I didn't found much about implementation of random on the forum or the wiki.