Junior Member
Join Date: Dec 2009
Posts: 7
|
Using the editor I have created a custom feat which has three opens to choose from via an array. I am however stumped on how to write an eval script that would add different effects based on which option was selected in the array.
Any guidance on this would be welcome. |
#1 |
Senior Member
Join Date: Aug 2010
Posts: 1,528
|
I think in many such cases people create separate Feats... one for each of the options, and add the option name to the Feat name. This assumes that the choice is made only once.. if the player can change the choice at will, then this will not work.
|
#2 |
Senior Member
Volunteer Data File Contributor
Join Date: Jan 2010
Location: Chicago, IL (USA)
Posts: 10,729
|
Example code:
Code:
~ Array's start at 0 index in HL if (field[usrIndex].value = 0) then ~ Do effect 1 logic elseif (field[usrIndex].value = 1) then ~ Do effect 2 logic elseif (field[usrIndex].value = 2) then ~ Do effect 3 logic endif Hero Lab Resources: Pathfinder - d20pfsrd and Pathfinder Pack Setup 3.5 D&D (d20) - Community Server Setup 5E D&D - Community Server Setup Hero Lab Help - Hero Lab FAQ, Editor Tutorials and Videos, Editor & Scripting Resources. Created by the community for the community - Realm Works kickstarter backer (Alpha Wolf) and Beta tester.- d20 HL package volunteer editor. |
#3 |
Junior Member
Join Date: Dec 2009
Posts: 7
|
Thank you very much Shadow
|
#4 |
|
|