Lone Wolf Development Forums  

Go Back   Lone Wolf Development Forums > Hero Lab Forums > HL - Pathfinder Roleplaying Game
Register FAQ Community Today's Posts Search

Notices

Reply
 
Thread Tools Display Modes
agdiv
Junior Member
 
Join Date: Dec 2009
Posts: 7

Old May 23rd, 2019, 04:37 PM
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.
agdiv is offline   #1 Reply With Quote
Silveras
Senior Member
 
Join Date: Aug 2010
Posts: 1,528

Old May 23rd, 2019, 05:05 PM
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.
Silveras is offline   #2 Reply With Quote
ShadowChemosh
Senior Member
Volunteer Data File Contributor
 
Join Date: Jan 2010
Location: Chicago, IL (USA)
Posts: 10,729

Old May 23rd, 2019, 05:13 PM
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.
ShadowChemosh is offline   #3 Reply With Quote
agdiv
Junior Member
 
Join Date: Dec 2009
Posts: 7

Old May 23rd, 2019, 05:26 PM
Thank you very much Shadow
agdiv is offline   #4 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 03: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.