+1 vote
by (350 points)

I cannot for the life of me figure out how to do this.

I've looked in the questions, the tutorials, but no one is doing this exact thing or they already know it and think it needs no explanation, I dunno.

I'm a super newbie but I at least understand the basics of how to use macros-- I just need a really simple, easy explanation of how to do this. If I need to switch to another story type that's gonna suck cause Sugarcube has the save game function and I need that.

What I'm looking for specifically is this:

What is it you want out of life?

*To be great

{When clicked I want this to say a whole paragraph or two about why the character thinks this way without going to a new passage and I want the other two options to disappear.}

*To be loved

{When clicked I want this to say a whole paragraph or two about why the character thinks this way without going to a new passage and I want the other two options to disappear.}

*To be accomplished

{When clicked I want this to say a whole paragraph or two about why the character thinks this way without going to a new passage and I want the other two options to disappear.}

End passage, continue link.

I'm also adding on to the values of some stuff but I already know how to do that whole +=1 thing.

Thanks in advance for any help at all. I know I'm probably asking a silly, beginner question but I am a beginner, so.

2 Answers

+1 vote
by (23.6k points)

Use <<replace>>:

<<nobr>>
@@#question;
What do you want to be in live?
<br>
<br>
<<link "To be loved">>
	<<replace "#question">>
	Text you want to be shown. <br> [[Continue]]
	<</replace>>
<</link>>
<br>
<<link "To be accomplished">>
	<<replace "#question">>
	Text you want to be shown. <br> [[Continue]]
	<</replace>>
<</link>>
<br>
<<link "To be great">>
	<<replace "#question">>
	Text you want to be shown. <br> [[Continue]]
	<</replace>>
<</link>>
@@
<</nobr>>

 

by (350 points)

I tried your code but it deleted the question itself, too. I only want the options to disappear. It's okay, the guy under you's way works, but thank you for trying to help me!

by (23.6k points)
It's the same code. He just already added the question to the "Text you want to be shown" segment.
by (350 points)
Ah okay, so I misunderstood when I plugged it in to test and see what it did.

Thank you both, then!
by (159k points)

warning: The above example is using the 'block' based syntax of Custom Style markup which normally generates a div HTML element, however because the <<nobr>> macro is wrapping the markup the line-break required by the 'block' syntax is being suppressed. This causes the markup to change to the 'inline' syntax which generates a span HTML element instead.

This is why the <<nobr>> macro in my example is placed inside the content of the Custom Style markup.

by (23.6k points)
What's the problem with using a span instead of a div?
+1 vote
by (159k points)

The following example uses Custom Styling markup to wrap all the option links in an area with an ID of options, and then uses the <<replace>> macro to replace all the option related links with specific output.

What is it you want out of life?

@@#options;
<<nobr>>
<<link "To be great">>
  <<replace "#options">>
    To be great<br><br>
    Whole paragraph or two about why the character thinks this way.
  <</replace>>
<</link>>
<br>
<<link "To be loved">>
  <<replace "#options">>
    To be loved<br><br>
    Whole paragraph or two about why the character thinks this way.
  <</replace>>
<</link>>
<br>
<<link "To be accomplished">>
  <<replace "#options">>
    To be accomplished<br><br>
    Whole paragraph or two about why the character thinks this way.
  <</replace>>
<</link>>
<</nobr>>\
@@\

[[Continue|Target Passage Name]]

 

by (350 points)
OH MY GOD THANK YOU SO MUCH

I was literally crying over this for so long. I kept trying to look up how to use replace and other macros and nothing seemed to work.

You've saved me.
...