It looks like you're new here. If you want to get involved, click one of these buttons!
(either: 'An enemy downs one of your teammate! (link: "Try To Save Him")[(either: "You go to save him, but you get attacked! (set: $all $ally - 1) [[Continue ->Fight]]","You go to save him, but you get attacked! (set: $all $ally - 1) [[Continue ->Fight]]","You save him, but as you run away, you get attacked. [[Continue ->Fight]]","You save him and escape! [[Continue ->Example Match]]")] (link: "Leave Him")[(either: "You leave him to die. (set: $all $ally - 1) [[Continue ->Example Match]]","You leave him to die, but another teammate goes to save him. Unfortunately, he is downed too.
(link: "Try To Save Them")[(either: "You go to save them, but get attacked! (set: $ally to $ally - 2) [[Continue ->Fight]]","You go to save them, but you only manage to save one! (set: $ally to $ally - 1) [[Continue ->Example Match]]","You go to save them, but only save one, AND get attacked! (set: $ally to $ally - 1) [[Continue ->Fight]]","You save them both, but get attacked. [[Continue ->Fight]]","You save them both! [[Continue ->Example Match]]")] (link: "Leave Them Both")[(either: "They both die. (set: $ally to $ally - 2) [[Continue ->Example Match]]","They both die. (set: $ally to $ally - 2) [[Continue ->Example Match]]","One manages to survive! (set: $ally to $ally - 1) [[Continue ->Example Match]]")]
Comments
If you don't understand or don't have an answer, don't worry - I have a way but it looks messy and confusing. Please, instead, try to answer my other questions which are more important.
You should use (either:) or (random:) to assign a value to a $variable and then use (if:), (else-if), and (else:) macros to determine which outcome happens.
The following example shows one way to achieve similar results. I have added a lot of extra line-breaks and indentation to make it more readable, which will need to be removed/condensed in your version.
You may notice that I have used the same variable name inside the (link:) macros as I used outside the links, this is ok in this particular case because that variable would be accessed until the Reader clicks on the link.
You have not misunderstood, and thank you for the answer - I did not know you could do that. I think I'll try greyelf's way though.
Thanks, but what are all the spaces for? I find them unclear and hard to read with them.
eg. there are associated hooks within associated hooks within associated hooks.
This is a common practice (known as formatting) used when trying to make the code more readable/understandable. All of that formatting can be safely removed and some of it would need to be condensed anyway to remove unwanted line-breaks in the screen output.
Here is a version of my previous code with most of the formatting removed, I believe it is now difficult to see the layering of the associated hooks.
note: I have also corrected the setting of the $ally variable bugs which were in your original example
Thanks. I don't why, but I just don't like the indentations - no offence.