|
Senior Member
Join Date: Nov 2017
Location: Trafford, PA, USA
Posts: 226
|
Hi everyone,
I've got a few more questions about scripts that are confounding me. Any help would be very appreciated. 1. Trying to put a class ability that grants fast healing when current hit points are below 50% of total hit points. I'm having trouble locating the child that current hit points are stored. Can anyone help direct me? 2. Another problem is a custom expression I am trying to write that does a foreach on memorized spells. I found a tag group name 'Memorized', so I used the following script: Code:
foreach pick in hero from BaseSpell where "Memorized.?" field[usrCandid1].text = splice(field[usrCandid1].text, eachpick.tagids[thingid.?], " | ") nexteach 3. Lastly (same ability as #2), once the user selects a memorized spell, I want to change the tag or field to reflect that it has been cast. I found the field 'sCastCount', but that produced an error message, so I tried decreasing the field 'sCastLeft', which didn't error, but did not produce the desired result. Guidance on this would be great. Thanks as always, and happy holidays to all of you. |
#1 |
Senior Member
Join Date: Nov 2017
Location: Trafford, PA, USA
Posts: 226
|
Update to question 1: I found the child by using the 'Show Task List (Active Hero)' floating info window in the Develop menu! Total and current hit points are stored in the child "Totals".
I hope this helps anyone with similar problems. |
#2 |
Senior Member
Join Date: May 2015
Posts: 830
|
The spells cast is tracked in the in play or spells tab.
|
#3 |
Senior Member
Join Date: Nov 2017
Location: Trafford, PA, USA
Posts: 226
|
Right, I found those, but none of the fields that I tried accomplish the goal. I tried 'sCastCount', but that produced an error message, so I tried decreasing the field 'sCastLeft', which didn't error, but did not produce the desired result. Not sure where to go from here.
|
#4 |
Senior Member
Join Date: May 2015
Posts: 830
|
What are you trying to do with the loop/script?
|
#5 |
Senior Member
Join Date: Nov 2017
Location: Trafford, PA, USA
Posts: 226
|
I am trying to write that does a foreach on memorized spells. I found a tag group name 'Memorized', so I used the following script:
Code:
foreach pick in hero from BaseSpell where "Memorized.?" field[usrCandid1].text = splice(field[usrCandid1].text, eachpick.tagids[thingid.?], " | ") nexteach The goal is to create a usr field where the candidates are memorized spells. |
#6 |
Senior Member
Join Date: Oct 2011
Posts: 6,793
|
Is this limited to just spellbook casters, or should it be catching, for example, spells memorized by a cleric? Should it not be iterating through spells known, like a sorcerer gets?
|
#7 |
Senior Member
Join Date: Nov 2017
Location: Trafford, PA, USA
Posts: 226
|
Just spellbook casters, this is a class ability for a class that memorizes arcane spells.
|
#8 |
Senior Member
Join Date: Oct 2011
Posts: 6,793
|
SpellType.cHelpXXX (replace XXX with whatever is appropriate for your class) and CasterType.MemBook
|
#9 |
Senior Member
Join Date: Nov 2017
Location: Trafford, PA, USA
Posts: 226
|
Quote:
Code:
foreach pick in hero from BaseSpell where "SpellType.cHelpArn" & "CasterType.MemBook" |
|
#10 |
Thread Tools | |
Display Modes | |
|
|