I'm attempting to create a Lightning gun weapon based on the bomb mechanic and am new to Hero lab scripting, but not entirely new to programming. I've taken the following bit of code:
and copied and pasted it. My question is this, I need to determine what my die value is for damage (level+1 /2). I imagine there's simple method to do that, but am unable to find an example on the boards.
Thanks!
Code:
~ normally, the uses of thrown weapons are shown in the tracker section
~ we don't want that to happen for this weapon, since our charges are
~ handled by the class special
perform delete[User.Tracker]
~ Generate the wFixDamage text, v_total is the modifier to damage,
~ element is the type of damage. damage is the number of dice done and
~ uses #value3[cAlcBomb] for the die size.
var v_total as number
var damage as number
var element as string
var isfire as number
var useval as number
damage=1
useval = 6
~isfire = 1
element = "Lightning"
call BombDam
and copied and pasted it. My question is this, I need to determine what my die value is for damage (level+1 /2). I imagine there's simple method to do that, but am unable to find an example on the boards.
Thanks!