Punctuation Interrupted By Variable


#1

As a silly example:

You pick up a flower
*if knivesforhands
   but cut it to pieces in the process. Curse these knives for hands of yours!
  *goto afterflowers
.
*goto afterflowers

Produces, if knivesforhands is false:

You pick up a flower .

Is there any way to get rid of that unsightly space before the period, or am I stuck with only rephrasing things so they have mid-sentence interjections, like so:

You pick up 
*if knivesforhands
  — and cut to pieces with these accursed knife-hands of yours —
a flower.
*goto afterflower

Or perhaps splitting off essentially-duplicate sentences inefficiently, like so:

*if knivesforhands
  You pick up a flower but cut it to pieces in the process. Curse these knives for hands of yours!
*if (knivesforhands = false)
  You pick up a flower.
*goto afterflower

Any other, better workarounds, or do I pretty much have it?


#2

have you got a space after you pick up a flower? If so that’s where the space is coming from. Try putting a space before but and having no space after pick up a flower


#3

No, I don’t have a space after “You pick up a flower,” or before “but” or the “.”


#4

Do this;

*temp knife_text "You pick up a flower"
*if knivesforhands
  *set knife_text knife_text &" but cut it to pieces in the process. Curse these knives for hands of yours!"
  ${knife_text}
  *goto afterflowers
*set knife_text knife_text &"."
${knife_text}
*goto afterflowers

#5

Looks like the space is automatically added. I’d just do.

You pick up a 
*if knivesforhands
   flower but cut it to pieces in the process. Curse these knives for hands of yours!
  *goto afterflowers
flower.
*goto afterflowers

#6

I think this is the solution. It’s so simple, I can’t believe I didn’t think of it. (I appreciate MutonElite’s fancy footwork, too — if I have a need for more complex chains of variables integrated into the sentence it’ll be useful.) Thanks, everyone.


#7

Yep, FG’s solution is the way I do it too.


#8

I use Fg’s way too but I’d like to be able to use ME’s way too.