Senior Member
Join Date: Jan 2007
Location: NW Arkansas
Posts: 1,321
|
Ok, I'm wondering if this is possible.
1) I have a gizmo helper, AmmoHelper, to help with the gizmo (ammo) for a weapon. Code:
<component id="AmmoHelp" name="Ammo Helper"> <!-- Gear cost --> <field id="WeaponBaseCost" name="Weapon Base Cost" minvalue="0" defvalue="0" type="derived"> </field> <!-- Selection Tag Expressions --> <field id="AmmoExpr" name="Equipment Tag Expression" type="derived" maxlength="500"> </field> </component> 3) This script runs on the ammo itself - Code:
(Render/100) ~make sure we're in a gizmo to travel to doneif (parent.isgizmo = 0) var parCost as number var myCost as number parCost = parent.field[grCost].value myCost = parCost * .20 field[grCost].value = myCost parent.field[grCost].value += myCost parent.field[wpDamage].text = field[amDamage].text Is there a way, when is it a Thing instead of a Pick, to use the BaseWeaponCost field from the AmmoHelper to calculate the cost to be displayed? Once the ammo is added to the weapon, the Total Value of the weapon and ammo (the weapon cost + 20% for the reload) is correctly displayed. Working on - |
#1 |
Thread Tools | |
Display Modes | |
|
|