Hi. I'm here. Again. This is a new system to me, so it's taking a while to figure it out fully even after the help and info pages. So wanted to make sure that this script does what I think it does so I don't start basing a bunch of stuff around it only to figure out that it doesn't work right. I have a Codex page. Thanks to Mizal, I got it working. I was confused on where to put the script mentioned in the Codex help and info until I figured out the option on the story properties to enable advanced scripting. But! There's a variable which, when you exit the codex page back to the story, affects another variable. So on the link back to the story, I should put in a thing saying (if the variable is between -1 and 1, then continue with the story and make sure %Z1 is set to 1. Otherwise add 1 to %A1 IF %Z1 >= -1 <= 1 THEN %Z1 := 1 ELSE %A1 := 1 Once A1 = 1, how do you keep Z1 value above 1? I've gone through all the scripting articles, but I still find myself being unclear on all the commands and how they work. (is there anyone willing to let me poke them every five minutes asking about how this or that works or how to implament a feature like ____ in a story?)
Thank you! As for the rest, Z1 is a variable that'll be changing constantly, as it tracks the change in magic energy level you're using from what you have stored. Or as it goes into negatives, the energy you're storing. It's interactive via the codex page setup, like the Homo Perfectus (5, I think?) where you can alter specifac amounts of the dna a certain extent. Once A1 is triggered, you are forced to keep using the energy until it is gone, and therefore cannot have a value of 1 or below. The magic usage must be a gradual thing, one level per story page in either direction, otherwise a temporary magic whiplash coma occurs. It gives you the ability to increase it by however much you want per story page, as that is how you end the game (either that or death) but deciding when to do it and how opens up a lot of possibilities, and the goal is to see as much of the story as possible before you die or fall into a coma. Or you could just look for the most badass op fight. There'll be little secrets and tidbit hidden here and there depending on which abilities you use and how. I had it set Z1 to 1, so that when they return to the story page they can't just go back into the items again and alter it more without consequence. The next page story link sets it to 0, and once it's 0 you can continue to manipulate it. A different variable tracks the magic level it actually is at. Although now that I'm seeing this, I'm realizing that they could continue to go in and keep storing energy indefinitely, even if they can't raise their energy usage that much. I suppose I'll have to make a mirror set of variables, just doing it for the negatives as well. Unless I can figure out some other way. Guess this is what happens when you make a fantasy world with certain rules and ways of doing things, and then try to form a cyoa around it. This is getting rather complex. And I'd be just fine with changing it to be simpler, but I've already got some major plot points planned that occur later on based around the way magic works later on in the comic I'm doing with it. I feel like I'm doing this the really hard way when there's something much simpler staring me in the face.
IF (-1 <= %Z1) = (%Z1 <= 1) THEN %Z1 := 1 ELSE %A1 := %A1 + 1 IF %A1 = 1 THEN IF %Z1 <= 1 THEN %Z1 := 2
Test whether %Z1 is greater than or equal to -1, then test whether it's less than or equal to 1. Both return a TRUE/FALSE value, and if both are equal, set %Z1 to 1; otherwise set %A1 to itself plus one. Afterwards, if %A1 is 1 and then if %Z1 is less than or equal to 1, set %Z1 to 2.
Normally, you'd use the AND operator with these, but it doesn't work properly with greater/less thans. In the first IF, you can cheat by replacing the AND with an equals sign (since both will never be simultaneously false), and in the second, you have to nest another IF within it.
Both you and Killa have a different example? Do they both work, or...?
If I wanted to have a set of script run every single link in the story except for those in a specific chapter, how would I do that? I believe you'd put it into the global link script, but how do you exclude the ones in that chapter? Or maybe just excluding a specifac page? Or do you just have to copy/paste it onto every link that it goes in and hope you don't miss one.
Do it globally and then add an IF check for the chapter or page ID. In a link script, the IDs are taken from the chapter/page on which the link was clicked.If for instance, you wanted to do something unless you were on chapter 2 or page 3, you do this:
IF $CHAPTERID != 2 AND $PAGEID != 3 THEN BEGIN # Do something END
So something like this in global link, IF $CHAPTERID != 1 THEN BEGIN %AIM := %AIM - %AIMU %BAL := %BAL - %BALU (etc) END and then copy paste for the other chapters just changing the id? Also, does using items count as if it were a link?
It seems that using items does not count as links. Although the global link is working, it isn't excluded from either chapter. I have chapter 1 for main story. Chapter 2 for item pages that are out of the story and where you control settings and all that and cannot have the same scripting running as it does for the actual story part. Chapter 3+ for tangents that come off the main story.
FWIW, AND does work perfectly fine as long as either side is an equality (=) or inequality (!=) operation.
AND
Ah! It seems I did it wrong! The various := / = / != were confusing to my sleep deprived brain. It seems to work perfectly fine now that I've fixed that. Thank you so much!
The chapter is more of a place holder/organizer for items. There's only about 3 of them so far, and probably won't be more than 5/6. With what brad suggested, either I did something wrong or it didn't work right. Edit: I did something wrong. This is why I shouldn't be doing this at 3 am. But it'd be nice to know how this way works as well to understand the system a bit better. I sorta have jumped right into the deep end without knowing how to swim, and now I'm just floundering around. So I'd have IF %EXCEPTION = 1 THEN (insert everything for the normal pages) And then on the pages that are excluded, use the page script to change the value to '0', and that will stop anything from happening on those pages?
What about multiple conditions to do one thing? The and statements are buggy?
Alright, so I have this on the page. On-page variable trick. The base is '%%VARIABLE%=%100%TEXT%%' correct? So shouldn't this work? When I playtest it, it's not working like this. It's showing most of the other sections as well. (I'm making paragraph spaces here for easier reading, but there aren't any instory) %%WEIU%>%1%He hisses, gritting his teeth while keeping his fractured leg off the ground.%% %%MSPU%>%1%He rubs his forehead where I headbutted him.%% %%AIMU%>%1% He rubs at his shoulder and his knee where I dislocated them.%%
I edited it becuase I found the problem was because I messed up with the 'WILU', but then I found a different problem of the same type further down on the page. When I have 2+ in only WEIU, this also shows up with it. %AIMU%>%1% He rubs at his shoulder and his knee where I dislocated them.%%
Make sure you have the right number of percentage signs.
I do! When I'm editing the page, it shows up like this %%AIMU%>%1%TEXT%% And then when I'm viewing the story, it shows up like this. %AIMU%>%1%TEXT%% No matter what values I have.
Try to copy it and then paste it back in with Control + Shift + V.
I can't confirm this. I ran those three where %TOP = 1, %FRANK = 2, and %STEVE = 3 and got
Bacon BaconCheeseHam Bacon Cheese Ham
I didn't realize that. I mean, I have this (but with 13 variables instead of just 3) where I do that and it works just fine. %%STRU%>%1%With that I jerk free of his grip and hit with a flat palm to his sternum, leaving him breathless. %%%%PREU%>%1%I keep my hand flat as I chop at a specific point in his right shoulder that dislocates it and his skeletal arm crashes to the ground. He retrieves it and uses it as a shield against another blow before putting it back on.%%%%BALU%>%1%I then hook my foot behind his knee and push, his height setting him off balance and letting him crash to the floor as I stay upright. He struggles to his feet.%% But between you and brad's suggestions, it's now fixed.
IF %A1 = 1 THEN BEGIN IF %HAT = 1 THEN BEGIN IF %ELEU < 2 THEN BEGIN %ELEU := 2 END END IF % BALU < 2 THEN BEGIN %BALU := 2 END END END IF %RG = 1 THEN BEGIN IF %PREU < 2 THEN BEGIN %PREU := 2 END END END END I'm hoping I understand this correctly. Would this work? If A1 equals 1, and hat equals 1, then if element is less than two, it becomes 2. If Balance is less than two, then it becomes 2. If RG equals 1, then if Precision is less than two, then it becomes 2. Right? Or do the IF/THEN not work this complex? I mean, this would be just a sample. Wanted to double check before I go do the whole 13 set.
Ahhah, wups. I don't believe that's what I was aiming for. If A1 = 1 is a condition for all that is below. A1 means that for the item you're using, you can no longer stop using your magic until it runs out. Hat, right glove, and left glove are magic items. If you're using Hat, then you cannot use the other items, and all miscellaneous magic enhancers must be in use. No mental or physical. If you're using right glove, then you cannot use either the hat or the left glove, and all mental magic enhancers must be in use. No miscellaneous or physical. Left glove the same, but physical. But if A1 is not equal to 1, none of this applies. I believe I had it mixed up in my head. Does this make more sense? IF %A1 = 1 THEN BEGIN IF %HAT = 1 THEN BEGIN IF %ELEU < 2 THEN %ELEU := 2 IF %BALU <2 THEN %BALU := 2 END IF %RG = 1 THEN BEGIN IF %PREU < 2 THEN %PREU := 2 END END
Not from the way I understand it? What he has is IF %A1 = 1 THEN BEGIN IF %HAT = 1 THEN BEGIN IF %ELEU < 2 THEN BEGIN %ELEU := 2 END END END IF % BALU < 2 THEN BEGIN %BALU := 2 END (and another section that apparently didn't copy.) In the top section, there are 3 begins and 3 ends. Therefore, none of that section is still running, and the middle section is completely independent. There is one begin and one end, and therefore has no effect on the bottom section either. Please correct me if I'm misunderstanding this. I'm pretty sure what I had in the post you replied to works the way I want it to, I'm just making sure there's no holes in it before I go and put it into my story. If you see something specific wrong with it, and perhaps a way to fix it, that would be awesome. I try to think of it like parenthesis, or modified nesting dolls, in terms of keeping organized what depends on what. (A1(RG(PREU = 2 WILU = 2) HAT(BALU = 2 ELEU = 2) LG(STRU = 2 PSPU = 2)))
I'm hoping to make a restart link at the end of a path that keeps track of how many times you've restarted and how often you use the powers and whether it was a complete waste of my time to script all that or not. It'd be in Score. +1 per time you use a power. +1,000 to 9,000 depending on which ending. Then when you hit restart, it multiplies the score by 1,000 and keeps going. So lets say they play through 5 times. The score could possibly end up being something like this. 10123024809270562018 First ending, third ending, eighth ending, seventh, second. Along with how much they used their powers, 12 times, 24 times, 92, 56, and 18. Just curious, but is there a number limit to the score? Any value it cannot surpass? Or could it be 40 numbers long and still be fine? (10 resets) Also, in the reset link script, I'd put something like %BAL := 9 %BALU := 0 %PRE := 9 %PREU := 0 etc for all the values I wanted to have reset, correct? Or is there possibly a button that says 'Reset all variable values to default except these'
Thread about Variable Upper Limit: http://chooseyourstory.com/forums/advanced-editor-forum/message/19764
"2,147,483,647. Any higher and it wraps back around to -2,147,483,648." - BradinDvorak
This means 10123024809270562018 is too big a number.
The thread is pretty old, so not sure if anything has changed, but if it hasn't you are gonna have to find another way to track how people played your game.
Faq. Maybe I'll just have it keep track of how much you've used the powers in general, and then make all those that have suffered reading through my game comment which endings they got and how many times they restarted. Also, it's quite handy knowing about the not needing to create variables thing. Wish I'd known about it sooner, woulda saved me a whole lot of trouble, but ya know. Maybe it'll make things easier from here on out.
That would take away any point of it. The score shows up when people comment, and I want to see what they did. Having the 1-9 depending on the ending means I still have no way of knowing at all what ending they got because each time they use the powers is also a +1. You couldn't differentiate whether the addition to the score was from the ending or the powers. The score has no reflection of in game achievements or anything of worth to the player. Originally it was just so I could collect data about what people did.
"Faq. Maybe I'll just have it keep track of how much you've used the powers in general, and then make all those that have suffered reading through my game comment which endings they got and how many times they restarted. " It'd be a pain in the arse for anyone to keep track of how many times they've used the powers, or recall it afterwards. Or if they saved it. Etc. So the score can keep track of that. But yeh, I'll have people comment what ending they got.
A link from the epilogue to the start again. Things change if you use that link instead of the one provided on the upper right hand corner. Edit: Ah! Sorry. Didn't see you edit the 'editting' in there.
57, yeah. I made them rather short and easy to change on purpose though. Such as Y01-Y13 and Z1-Z13. The wonders of copy/paste.
I am confused by your question.
I was hoping to know which ending they got as well. I'm just gonna stick to them commenting what endings they got and the score keeping track on how much they used the energy manipulation thing.
Heyyyy, so, I went to test my game, and something that was previously accessible, is no longer accessible. I get this error. Did I do something wrong? Is there a way to fix this?
Server Error in '/' Application.
Index was outside the bounds of the array.
Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code. Exception Details: System.IndexOutOfRangeException: Index was outside the bounds of the array. Source Error:
Line 45: Line 46: //must be, load storystate Line 47: State = StoryState.CreateFromString(Request.Form["SS"]); Line 48: Line 49: //determine action
Source File: c:\Websites\ChooseYourStory\ChooseYourStory.com\Story\Viewer\Default.aspx Line: 47 Stack Trace:
[IndexOutOfRangeException: Index was outside the bounds of the array.] ChooseYourStory.Stories.StoryState.LoadFromString(String encodedSaveString) in C:\ProgramData\InedoAgent\BuildMaster\Temp\_E67973\Src\ChooseYourStory\Stories\StoryState_ToFromString.cs:63 ChooseYourStory.Stories.StoryState.CreateFromString(String storyState) in C:\ProgramData\InedoAgent\BuildMaster\Temp\_E67973\Src\ChooseYourStory\Stories\StoryState.cs:63 ASP.story_viewer_default_aspx.OnLoad(EventArgs e) in c:\Websites\ChooseYourStory\ChooseYourStory.com\Story\Viewer\Default.aspx:47 System.Web.UI.Control.LoadRecursive() +68 System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +3811
Version Information: Microsoft .NET Framework Version:4.0.30319; ASP.NET Version:4.7.2106.0
I've tried everything from remaking the page to deleting the global link I'd just put in. There's no link scripts directly on the link going to the error page, or page scripts on the page, otherwise I'd check that too. I cannot figure out how to fix it. I thought it had something to do with me trying to put in scripting that I hadn't checked if worked here first, but that doesn't seem to have any effect. Putting this in bugs and problems.
I have hope that this is the reason for the error and that it's fixable. It's the only thing I can think of. But this is fine, right? I didn't get confirmation for my small sample the other day, and I ended up plowing ahead anyway. IF %A1 = 1 THEN BEGIN IF %HAT = 1 THEN BEGIN IF %ELEU < 2 THEN %ELEU := 2 IF %AIMU <2 THEN %AIMU := 2 IF %BREU <2 THEN %BREU := 2 IF %HEAU <2 THEN %HEAU := 2 IF %SENU <2 THEN %SENU := 2 END IF %RG = 1 THEN BEGIN IF %PREU < 2 THEN %PREU := 2 IF %BALU <2 THEN %BALU := 2 IF %PSPU <2 THEN %PSPU := 2 IF %STRU <2 THEN %STRU := 2 IF %WEIU <2 THEN %WEIU := 2 END IF %LG = 1 THEN BEGIN IF %MCAU <2 THEN %MCAU := 2 IF %MSPU <2 THEN %MSPU := 2 IF %WILU <2 THEN %WILU := 2 END END
Already did that. Still got the same error.
Still there. Edited page with the error, and page before hand. Deleted and remade the page. Changed the link. Checked all scripts.
There are only two scripts that deal with $dest so far, and that deals with the codex and the page you access right before the error page. I checked them both anyway, and there's nothing wrong with them. They do exactly as they're supposed to, and they don't effect the error page at all. Just in case, I fiddled with the one that lead to the page before the error and put it as IF %A1 = 1 THEN $DEST := "@P" + 6 and it still took me to the desired page, and the error was still on the page after it.
I didn't realize that could be a problem. I use the rich text editor, due to several colour changes with the text and other annoying fun stuff. So something wrong with the span info didn't even cross my mind.
Any chance you can change the title of the page based on variables? The title of the pages address you as the reader. So when you use the in-game reset button, it changes what is being said to you. If you repeatedly make choices that end up with Ahti getting killed it'll warp to loathing scathing comments. If everything turns out to be semi-alright, or you're trying to change things towards the better, it'll be comments that tolerate you and perhaps a mild curiosity. This would be just musings about a feature to include after the contest, unless it's somehow really simple.
What'll happen if on link script: IF %RESETS = 2 THEN $DEST := @P16 IF %A1 = 1 THEN $DEST := @P12 If they're both true, what page does it go to? The first or last $dest listed? Or does it spazz out the system?
Is there a way to have multiple variables affect whether or not a certain text pops up in the middle of the page? With scripting and pagetext, that's only at the bottom of the page, right? On page variables can be anywhere on the page, but only deal with one variable at a time? If I'm misunderstanding it and there is a way to do it, lemme know. Otherwise I guess I'll have to figure out some throwaway variables to include. Pagescript runs before you read the page itself, right?
On page variable if statements?
Those seem to be dealing with only 1 variable at a time though. In pagetext it would be something like IF %PSP > 1 THEN BEGIN IF %STR > 1 THEN $PAGETEXT := $PAGETEXT + "With your speed and strength combined, you hit him multiple times with considerable force." END Is there a way to have that in the middle of the page instead of the end of the page?
What do the % with onpage variables do anyway? I believe two together, %%, is start/stop. Not sure what the rest do, or how.
This is what I was thinking when I mentioned 'throwaway variables'. Of course, I'd have to add them all to the reset script, and there's probably about a dozen at least to do if I were to do it that way. Hopefully there's something easier, but if I can't keep the coloured text with pagetext easily, or some other method, I can always do this.
I didn't think about that. That'd be easy to do instead. When doing $PAGETEXT, can you still have colour changes?
With how often I change colours, I'm going to have to pass on this method for now. I'll keep it in mind as a possibility.
Alright. Thank you!
Just clarifying how ELSE statements work. IF %PSP = 2 THEN BEGIN IF %STR = 2 THEN $PAGETEXT := $PAGETEXT + "speed and strength" END ELSE BEGIN IF %PSP = 2 THEN $PAGETEXT := $PAGETEXT + "speed" IF %STR = 2 THEN $PAGETEXT := $PAGETEXT + "strength" END If I understand this correctly, if you have both Speed and Strength set to 2, then it only shows the first batch of pagetext, not the second? Then if you only have one set to 2, it only shows dialogue for that one attribute instead of both.
For the sake of organization and simplicity, if I were to move the BEGIN, does it make a difference? BEGIN IF %PSP = 2 THEN IF %STR = 2 THEN $PAGETEXT := $PAGETEXT + "speed and strength" END ELSE BEGIN IF %PSP = 2 THEN $PAGETEXT := $PAGETEXT + "speed" IF %STR = 2 THEN $PAGETEXT := $PAGETEXT + "strength" END (also, for that first 'if then if then', does it have to be connected by another begin/end for both to need to be true to move on, or is it fine as is?)
IF...THEN...BEGIN...IF...THEN...ELSE...END...ELSE In his example, there's that. An else after the end which I believe applies to the first IF THEN here. So I would assume so. Unless he was rambling randomly. By crossing streams, I'm pretty sure he meant have nothing 'else' applies to be inside a BEGIN that the else is not in. Can't have else apply to anything outside the begin/end sequence that it is written in.
Welp, this is going to get very confusing very fast. Wish I had known just how complex this was going to be BEFORE entering the contest. Or perhaps had already completed a story in this universe so I could've just copy/pasted my script instead of figuring it out and writing it all. IF %PSP = 2 THEN IF %STR = 2 THEN IF %WEI = 2 THEN $PAGETEXT:= $PAGETEXT + "speed and strength and weight" IF %PSP = 2 THEN IF %STR = 2 THEN IF %PRE = 2 THEN $PAGETEXT:= $PAGETEXT + "speed and strength and precision" ELSE BEGIN IF %PSP = 2 THEN IF %STR = 2 THEN $PAGETEXT:= $PAGETEXT + "speed and strength" IF %WEI = 2 THEN IF %PSP = 2 THEN $PAGETEXT:= $PAGETEXT + "speed and weight" ELSE BEGIN IF %PSP = 2 THEN $PAGETEXT:= $PAGETEXT + "speed" END I can tell already this isn't going to work, since I believe that 'else' only applies to the previous statement? Not sure how to have something like this so that if you have 3, the text for only having 1 or 2 don't show up. Or if I have 2, the text for only having 1 doesn't show up.
I have a couple pages where I just have on-page variables, but for energies that'd stack or affect one another, I found it rather limited and stunted. If this ends up being too terribly complex (I have 13 of these attribute variables to work with, different combinations. I won't be doing ALL combos, as that'd be ridiculous, but a few here and there to spice things up would be nice. If it's too complex, I'll have to stick with on-page stunted text and wait for this until after the contest.) This would be an example of what I'd have, if this code were to have been able to work. IF %PSP = 2 THEN IF %STR = 2 THEN IF %WEI = 2 THEN $PAGETEXT:= $PAGETEXT + "My hand is blindingly fast as I swing hard, catching a person in the chest with enough force to knock the wind out of him and send him tumbling backwards, knocking over another two people. The weight behind the hit might've been enough to fracture his sternum, and I worry about him. My intent is to keep them away from the person with me, not send them to the hospital. I'm distracted by my worry, and I feel a blinding pain as someone lands a left hook to my jaw." IF %PSP = 2 THEN IF %STR = 2 THEN IF %PRE = 2 THEN $PAGETEXT:= $PAGETEXT + "I hit the same spot on a person's chest rapidly with enough force to set him off balance and take a couple steps back out of my immediate fighting range. A different person takes their place." ELSE BEGIN IF %PSP = 2 THEN IF %STR = 2 THEN $PAGETEXT:= $PAGETEXT + "I hit a person hard and fast, but my hits aren't very concentrated. It does damage though, and although he seems determined, it appears he'll withdraw soon." IF %WEI = 2 THEN IF %PSP = 2 THEN $PAGETEXT:= $PAGETEXT + "I quickly place my hands on someones shoulders and jump, bearing all my increased weight on those points, knocking them off balance and they start to fall. Before I loose my balance as well, I quickly extend my legs to the ground again and let go. It'll keep people from coming from that direction for a moment, but I'll have to deal with him again later as I turn my attention to someone else in the mob." ELSE BEGIN IF %PSP = 2 THEN $PAGETEXT:= $PAGETEXT + "I don't have force to put behind my hits, nor really much precision. I try my best to aim for soft spots that temorarily take them out of the fight, but they'll ultimately be just fine and coming back. I'm mostly just conserving my energy for a longer fight until Ammon comes to help me fend off the mob trying to lynch my newfound friend whom I don't know their name yet. Or perhaps if he doesn't come, I can outlast the mob and when they've drained their own energy stores we can skedaddle outta here." END
Well, yes. I realized that. Like I said - "I won't be doing ALL combos, as that'd be ridiculous, but a few here and there to spice things up would be nice." And there prolly won't be anything more than maybe half a handful that depend on 3 variables. All the ones that depend on just 1 will be there. Quite a few that depend on 2, but not all combos. And there's also groupings, if you're using the attributes associated with the right glove (strength, speed, etc), then you can't use any that are associated with the left glove (mental abilities, willpower), or any with the hat (miscellaneous, elemental) So there's a group of 5, 3, and 5 that you can mix around with and combine with itself, but not the other groupings. Alright, that was a lot simpler then I thought it'd be. Didn't realize you could stack 'ELSE' like that. Thank you. ^_^ You're a life saver.
IF %PSP = 2 THEN BEGIN IF %STR = 2 THEN IF %WEI = 2 THEN $PAGETEXT:= $PAGETEXT + "My hand..." END ELSE IF %PSP = 2 THEN BEGIN IF %STR = 2 THEN IF %PRE = 2 THEN $PAGETEXT:= $PAGETEXT + "I hit ..." END ELSE IF %PSP = 2 THEN BEGIN IF %STR = 2 THEN $PAGETEXT:= $PAGETEXT + "I hit a person..." END ELSE IF %WEI = 2 THEN BEGIN IF %PSP = 2 THEN $PAGETEXT:= $PAGETEXT + "I quickly..." END ELSE IF %PSP = 2 THEN $PAGETEXT:= $PAGETEXT + "I don't have..." I tried it the first way you suggested, tried to the one mentioned above. Tried altering it a bit myself to see if maybe you'd just stopped halfway through. No matter what I do though, I don't get the text for anything other than if psp, str, and wei = 2.
It's not working because macroscopically, you have something like this:
IF %PSP = 2 THEN (BLOCK A) ELSE IF %PSP = 2 THEN (BLOCK B)
If %PSP is 2, it'll execute block A and then break out of the chain, without ever even considering block B. If it isn't 2, naturally neither of the blocks will execute. In this case, you've got multiple conditions that have some shared subconditions, so they each must be tested as a whole, and this is where a few logical ANDs can be really useful.
IF %PSP = 2 AND %STR = 2 AND %WEI = 2 THEN $PAGETEXT:= $PAGETEXT + "My hand..." ELSE IF %PSP = 2 AND %STR = 2 AND %PRE = 2 THEN $PAGETEXT:= $PAGETEXT + "I hit..." ELSE IF %PSP = 2 AND %STR = 2 THEN $PAGETEXT:= $PAGETEXT + "I hit a person..." ELSE IF %PSP = 2 AND %WEI = 2 THEN $PAGETEXT:= $PAGETEXT + "I quickly..." ELSE IF %PSP = 2 THEN $PAGETEXT:= $PAGETEXT + "I don't have..."
Don't be afraid of using AND and OR when you're dealing strictly with equality/inequality (= and !=). That's when they actually do work. In the event, however, that you end up using greater/less comparisons, you need to branch out your possibilities like this:
IF %PSP = 2 THEN BEGIN IF %STR = 2 THEN BEGIN IF %WEI = 2 THEN $PAGETEXT:= $PAGETEXT + "My hand..." ELSE IF %PRE = 2 THEN $PAGETEXT:= $PAGETEXT + "I hit ..." ELSE $PAGETEXT:= $PAGETEXT + "I hit a person..." END ELSE IF %WEI = 2 THEN $PAGETEXT:= $PAGETEXT + "I quickly..." ELSE $PAGETEXT:= $PAGETEXT + "I don't have..." END
IF %PSPU > 1 THEN BEGIN IF %STRU > 1 THEN BEGIN IF %WEIU > 1 THEN $PAGETEXT := $PAGETEXT + "My hand..." ELSE IF %PREU > 1 THEN %PAGETEXT := $PAGETEXT + " ELSE $PAGETEXT := $PAGETEXT + "I hit..." END ELSE IF %WEIU > 1 THEN $PAGETEXT := $PAGETEXT + "I quickly ... " ELSE IF %BALU > 1 THEN $PAGETEXT := $PAGETEXT + "PSPU AND BALU" ELSE $PAGETEXT := $PAGETEXT + "I don't have ...." END IF %STRU > 1 THEN BEGIN IF %BALU > 1 THEN $PAGETEXT := $PAGETEXT + "BALU AND STRU" ELSE IF %WEIU > 1 THEN $PAGETEXT := $PAGETEXT + "STRU AD WEIU" ELSE $PAGETEXT := $PAGETEXT + "STRU" END IF %WEIU > 1 THEN $PAGETEXT := $PAGETEXT + "..." IF %PREU > 1 THEN BEGIN IF %BALU > 1 THEN $PAGETEXT := $PAGETEXT + "PREU AND BALU" ELSE $PAGETEXT := $PAGETEXT + "PREU" IF %BALU > 1 THEN $PAGETEXT := $PAGETEXT + "BALU" If I'm understanding this correctly, this should work, yes?
I do have that on a page. When you do what you're explicitly told not to do, and one of the only non-hero endings. (small sample) I say, starting off softer and increasing to a shout. %%STRU%>%1%With that I jerk free of his grip and hit with a flat palm to his sternum, leaving him breathless. %%%%PREU%>%1%I keep my hand flat as I chop at a specific point in his right shoulder that dislocates it and his skeletal arm crashes to the ground. He retrieves it and uses it as a shield against another blow before putting it back on.%%%%BALU%>%1%I then hook my foot behind his knee and push, his height setting him off balance and letting him crash to the floor as I stay upright. He struggles to his feet. %%%%PSPU%>%1%My foot is blindingly fast and I land a kick, then a third and a fourth. %% This is the most fluid I could have that way. If you look, no matter what combination you get, it does make sense. No random starting words that might've connected to something else that isn't there. This is also a lesser fight, where what your stats are don't affect anything at all besides the words on the page. For the big main fight, I wanted to go fancy. Different combinations mean different courses of action, and the injuries from those actions are still present in the epilogue, including hospital fees or going to court because of the various people you've seriously injured.
Still wondering about the IF %PSP = 2 THEN IF %STR = 2 THEN and if that's valid or if I have to seperate it be begin/end statements.
That makes things a whole lot simpler.