View Single Post
harkan
Senior Member
Volunteer Data File Author
 
Join Date: Mar 2005
Posts: 345

Old January 27th, 2006, 11:22 AM
u can set the first option to attach a tag to the unit using unit.assign and then set the second option to have a live statement to check for this new tag. Ensure the second option has a lower priority that the first option though otherwise it won't work.

i.e u have a unit with an option that is add spears. When the unit has got spears and only when they can choose shields. Attached to the eval script for the option 'spears' is:

var retval as number
retval = unit.assign[defence.shield]

and in the live statement for the option shield is:

defence.shield

In this example the spear option is at priority 10, the shield is at priority 20
harkan is offline   #2 Reply With Quote