Lone Wolf Development Forums  

Go Back   Lone Wolf Development Forums > Hero Lab Forums > HL - Authoring Kit
Register FAQ Community Today's Posts Search

Notices

Reply
 
Thread Tools Display Modes
AndrewD2
Senior Member
 
Join Date: Mar 2007
Location: Muskegon, MI
Posts: 2,975

Old March 2nd, 2016, 12:58 PM
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?
AndrewD2 is offline   #1 Reply With Quote
Mathias
Senior Member
Lone Wolf Staff
 
Join Date: May 2005
Posts: 13,213

Old March 2nd, 2016, 01:16 PM
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.
Mathias is offline   #2 Reply With Quote
AndrewD2
Senior Member
 
Join Date: Mar 2007
Location: Muskegon, MI
Posts: 2,975

Old March 2nd, 2016, 01:39 PM
Ahh OK, guess I didn't realize that I had to do that for a field on the component.
AndrewD2 is offline   #3 Reply With Quote
Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -8. The time now is 12:24 AM.


Powered by vBulletin® - Copyright ©2000 - 2024, vBulletin Solutions, Inc.
wolflair.com copyright ©1998-2016 Lone Wolf Development, Inc. View our Privacy Policy here.