Senior Member
Join Date: Mar 2007
Location: Muskegon, MI
Posts: 2,975
|
I created a component called "Ability Prereqs" it contains 9 fields, one for each ability score in the game. Any other compset that needs to do ability req checks gets this component added to it.
I've created 9 component pre-reqs, one for each ability and I'd like them to give the message as "Strength " & field[reqSTR].value & " or higher required." I thought you could set the message with a script using the @message variable/keyword, but it throws an error of invalid use. I've looked at the prereq element on the wiki but it doesn't really seem to say anything about generating the text instead of just having a set message. Any ideas? |
#1 |
Senior Member
Lone Wolf Staff
Join Date: May 2005
Posts: 13,213
|
altthing.field[resSTR].value
Remember, the context of a prereq is the container of the item, or the container it's being added to, so usually the hero, and there's no herofield[reqSTR].value, so you need to move to the item that's running the prereq instead. If you have scripts that might alter the reqSTR value after the item is added, you'll want an if..else, based on @ispick, and using altpick in the pick branch, altthing in the thing branch. |
#2 |
Senior Member
Join Date: Mar 2007
Location: Muskegon, MI
Posts: 2,975
|
Ahh OK, guess I didn't realize that I had to do that for a field on the component.
|
#3 |
|
|