Junior Member
Join Date: Sep 2010
Posts: 12
|
Hi, I have been working on adding content for the Drakonheim setting. There is one edge which has got me stumped. I would be very grateful if someone with more knowledge than me could help. The edge I am trying to create is called Military Discipline. The edge allows the character to gain one combat edge of their choice, ignoring its rank requirement, but other requirements must still be met. So far I have managed to get the edge set up with a menu using EdgeType.Combat for the menu expression. But I am at a loss as to how to the evaluation script. The best I can come up with is to use the code I've found in the forum to apply the ignore rank helper to all Combat edges. But I'd really like to find a way to do it for just the chosen edge. Any ideas?
Code:
if (field[usrChosen1].ischosen<>0) then foreach thing in Edge where "EdgeType.Combat" var ignoretag as string ignoretag = "IgnoreRank." & eachthing.idstring perform hero.assignstr[ignoretag] nexteach endif |
#1 |
Senior Member
Volunteer Data File Contributor
Join Date: Aug 2009
Posts: 1,556
|
Is this perhaps what you are after?
Code:
if (eachpick.uniqindex = field[usrChosen1].chosen.uniqindex) then _ Currently In Development: Savage Pathfinder, SWADE Fantasy Companion Future Development: SWADE Super Powers Companion, SWADE Sci-Fi Companion _ Currently Running: Savage Unity Inc. (homebrew multiverse theme) Setting Files Supported: Deadlands: Reloaded, Flash Gordon, Gaslight, Hellfrost, Interface Zero 2.0, Seven Worlds, Slipstream, Solomon Kane Future Setting Files: Savage Judge Dredd |
#2 |
Junior Member
Join Date: Sep 2010
Posts: 12
|
Thanks CapedCrusader for taking the time to reply. While the code wasn't exactly what I wanted, it did point me in the right direction and helped me think around the problem until I found a solution. In the end I did what I wanted with the following code. I'm posting it here in case anyone else has a similar thing they want to do.
Code:
if (field[usrChosen1].ischosen<>0) then var chosenindex as string chosenindex = field[usrChosen1].chosen.idstring foreach thing in Edge where "EdgeType.Combat" if (compare (eachthing.idstring,chosenindex) = 0) then var ignoretag as string ignoretag = "IgnoreRank." & eachthing.idstring perform hero.assignstr[ignoretag] endif nexteach endif Last edited by Stephen Peto; April 27th, 2020 at 05:35 AM. |
#3 |
|
|