View Single Post
KarlM
Junior Member
 
Join Date: Jun 2011
Location: Canberra, Australia
Posts: 10

Old June 7th, 2011, 02:37 PM
Quote:
Originally Posted by Lawful_g View Post
Well I assume you wrote an eval script on the feat to assign the tag to the hero. As long as the eval scripts on your specials run at a later phase and priority than the script assigning the tag then they should be able to detect that tag and show themselves.
Yes exactly. However I cannot get that to work.

I have a tag, User.PickAbil, assigned to two different specials, Abil01 and Abil02. In the feat, Custom Expression has the value User.PickAbil. That part works fine.

I have this script on the feat (wrapper stuff copy/pasted from other people's work, including yours! thanks so much btw!)
Code:
Pre-Levels, 4500, 1

~ If we're disabled, do nothing
doneif (tagis[Helper.FtDisable] <> 0)
 
~ If we haven't chosen anything, get out now
if (field[fChosen].ischosen = 0) then
  done
endif

~ Assign an appropriate tag to ourselves depending on choice
if (field[fChosen].chosen.tagis[User.Abil01] <> 0) then
  perform hero.assign[User.Abil01]
elseif (field[fChosen].chosen.tagis[User.Abil02] <> 0) then
  perform hero.assign[User.Abil02]
endif
 
~don't show us when printed
if (state.isoutput <> 0) then
  perform assign[Helper.FtHide]
endif
I can bring up the hero tags window, with no choice made, and neither tag is assigned. I can choose Abil01 or Abil02, and see the appropriate tag assigned to the hero. I can swap between the two choices and see the tag change. So that part works ok as well.

This next part doesn't work. In the special called Abil01, I have this eval script:
Code:
Pre-Attributes, 5000, 1

if (hero.tagis[User.Abil01] <> 0) then
  perform assign[Helper.ShowSpec]
endif
perform hero.assign[User.Abils]
I'm assigning the User.Abils tag on the hero, in order to demonstrate to myself that the script has in fact run: this tag never appears.

So I'm thinking I must be missing something. Probably something obvious?
KarlM is offline   #5 Reply With Quote