Follow along with the video below to see how to install our site as a web app on your home screen.
Note: This feature may not be available in some browsers.
Here's how I'd probably approach it.
Code:~ Set our listname based on xIndex var climbspeed as number climbspeed = (field[xIndex].value + 1) * 10 field[listname].text = "Climb (" & climbspeed & ")" ~ Only do the rest if we're high enough level doneif (tagis[Helper.ShowSpec] = 0) ~ Only do the rest if we're not disabled doneif (tagis[Helper.SpcDisable] <> 0) ~ Only do the rest if we're the first copy doneif (tagis[Helper.FirstCopy] = 0) ~ We'll just use the same variable from before, overwritting it's value climbspeed = (field[xCount].value + 1) * 10 ~ Now we'll set our climb speed equal to what is granted by this ability, or it's current value, whichever is higher hero.child[xClimb].field[abValue].value = maximum(hero.child[xClimb].field[abValue].value, climbspeed)
Okay so I've been pouring over this trying to figure out how the logic is working and I think I'm getting it. Where it says "doneif", I thought it meant this function could be triggered if it fulfills these prerequisites (ie 'this will be done if...'). But I was wrong, right? It's rather that the script stops if any of these conditions fall through (ie 'the script is done if...'). So if it doesn't have the FirstCopy tag or ShowSpec tag (ie (tagis[Helper.ShowSpec] = 0) or (tagis[Helper.FirstCopy] = 0), then the script stops, and it's the same if the disabled tag is anything other than 0 (ie (tagis[Helper.SpcDisable] <> 0)).
I think that's what those 3 lines meant so tell me if I'm wrong.
So then the next assumption, based on the point that the script ends after the 4th line if there isn't a [Helper.FirstCopy] tag, is that the first 4 lines are meant to function as the script that will be run at each application of the special, right? Whereas the last 5 are meant to usurp the first 4 lines but only function on the first copy? But I'm a little confused by the [Helper.ShowSpec] tag. "When a class has enough levels that the class ability should be gained, that copy gains a Helper.ShowSpec tag" is what you said and you also have the Helper.ShowSpec doneif script in there... but regardless of how many Helper.Showspec tags the special has, won't it never run because after the first special no other special will have the Helper.FirstCopy tag? What I'm trying to ask is that as long as the Helper.FirstCopy doneif script is there then isn't that all you need to keep the last 5 lines of the script from running? Or do the Helper.ShowSpec and the Helper.SpcDisable keep something from running that the Helper.FirstCopy doneif wouldn't?
Sorry this isn't literally about getting anything to work, I'm just trying to understand scripting better so I might not have to ask as many questions.
I understand you might have just been including all three so I could see them.
I think I understand, now, though, that the Helper.ShowSpec is there to only allow specials with the ShowSpec tag applied (ones the character qualifies for by level), that the Helper.SpcDisable tag is there so that it won't run if it has the SpcDisable tag (ie if something unexpected is inadvertently disabling it), and that the Helper.FirstCopy tag is used to run a script reserved to only be used the first time the special is applied.
Thanks for teaching me these - I think it'll be a lot easier to control scripts with em!
Oh right: One last question. In the first 4 lines you put down:
climbspeed = (field[xIndex].value + 1) * 10
Whereas in the last 5 you put:
climbspeed = (field[xCount].value + 1) * 10
What's the difference between the xIndex and xCount and why do you use the xCount for the first copy but the xIndex for every other copy?
XML is not really a programming language its "Extended Markup Language" actually and is an extension of HTML. Used more for machines to give information to each other.I don't have any formal training myself, but I believe it's called XML.
XML is not really a programming language its "Extended Markup Language" actually and is an extension of HTML. Used more for machines to give information to each other.