Hey!
I’m working on a character creation system in Twine 2.0 and have run into a problem with whitespace. At the moment the *buttons* work the way I want them to, however the code seems to be very clunky and not only does it produce an error but it produces an ever expanding amount of whitespace below the buttons every time they are clicked. I’ve tried using { } to place all the code onto a single line but this doesn't seem to work. Although it does place all the code onto a single line, when the buttons are pressed it seems to create new code. I assumed it was something to do with the link repeat macro but I tested that on its own and it doesn't produce whitespace when clicked. (Just to clarify I know the error is an issue but the whitespace appearing was a problem before I introduced that part)
Can anyone recommend a potential solution to this? The increasing amount of whitespace makes it impossible to write anything under the *buttons*.
Thanks!
I’m working on a character creation system in Twine 2.0 and have run into a problem with whitespace. At the moment the *buttons* work the way I want them to, however the code seems to be very clunky and not only does it produce an error but it produces an ever expanding amount of whitespace below the buttons every time they are clicked. I’ve tried using { } to place all the code onto a single line but this doesn't seem to work. Although it does place all the code onto a single line, when the buttons are pressed it seems to create new code. I assumed it was something to do with the link repeat macro but I tested that on its own and it doesn't produce whitespace when clicked. (Just to clarify I know the error is an issue but the whitespace appearing was a problem before I introduced that part)
Can anyone recommend a potential solution to this? The increasing amount of whitespace makes it impossible to write anything under the *buttons*.
Thanks!
(set: $Health to 5) (set: $Attripoints to 5) (set: $Apointsplus to true) Attribute Points = [$Attripoints]<attripoints| {Health = [$Health]<health| (link-repeat: "Health +1")[ (if: $Attripoints >= 1)[(set: $Apointsplus to true)] (if: $Attripoints <= 8)and(if: $Apointsplus is true)[ (set: $Health to $Health +1) (set: $Attripoints to $Attripoints -1) (replace: ?health)[$Health] (replace: ?attripoints)[$Attripoints] (if: $Attripoints is 0)[(set: $Apointsplus to false)]]] (link-repeat: "Health -1")[ (if: $Attripoints < 8)[ (set: $Health to $Health -1) (set: $Attripoints to $Attripoints +1) (replace: ?health)[$Health] (replace: ?attripoints)[$Attripoints]]]}