Junior Member
Join Date: Aug 2005
Posts: 19
|
I have a unit with options for three Weapons: Gauss Rifle, Naginata or Sniper Rifle.
If the Gauss Rifle or Naginata are selected then the unit will be a compulsory choice and have a tag of type.Retainer If the Sniper Rifle is selected then the unit will not be compulsory and thus cannot have the tag type.Retainer At the moment the Sniper Rifle choice is a separate unit entry because I cannot figure out how to assign the type.Retainer tag when only the Gauss Rifle or Naginata options are selected. Or is it best to assign a unit tag of type.Retainer anyway, and try to delete it whenever the Sniper Rifle option is selected? And if that is the case then how do I go about it? Thanks |
#1 |
Senior Member
Volunteer Data File Author
Join Date: May 2005
Location: Santa Cruz, CA, US
Posts: 123
|
you can use the Eval script of the options to add or remove tags:
Code:
var result as number result = unit.assign[type.Retainer] Code:
var result as number result = unit.delete[type.Retainer] Space Marine Maintainer for AB3 Battlefleet Gothic Maintainer for AB3 40K: Space Wolves, 13th Company, Grey Knights, Deathwatch BFG: Space Marine Fleet, Armageddon Fleet, Tau Fleet |
#2 |
Junior Member
Join Date: Aug 2005
Posts: 19
|
Excellent. Many Thanks!
I volunteered to work on this data file with absolutely no knowledge of XML and managed to finish the file using the minimum amount of coding. Now it's finished I've taken it upon myself to go through the file and try to simplify things for the users as much as possible - unfortunately that means a lot more coding for me!! So thanks a lot for the quick and extremely helpful response!! No doubt there'll be more silly questions before I'm finished! |
#3 |
|
|