• Please note: In an effort to ensure that all of our users feel welcome on our forums, we’ve updated our forum rules. You can review the updated rules here: http://forums.wolflair.com/showthread.php?t=5528.

    If a fellow Community member is not following the forum rules, please report the post by clicking the Report button (the red yield sign on the left) located on every post. This will notify the moderators directly. If you have any questions about these new rules, please contact support@wolflair.com.

    - The Lone Wolf Development Team

Pre-Req messages.

AndrewD2

Well-known member
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?
 
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.
 
Back
Top