NEXT - splitting a body of text (a cutscene if you will)

Just a simple one.

There’s a particularly important event in my game. A cutscene if you will. It’s a very large body of text that when printed all at once almost fills up the entire screen.

Not only does it look bad to suddenly have this huge body of text appear out of nowhere, if there’s a major spoiler in the cutscene (such as “No Luke, I AM your father!”) there’s a good chance the player’s eyes will catch it before they find the top of the cutscene.

So I want to be able to split it into separate parts that appear one after another when the player presses enter. Does Inform have such a feature built in, or will I have to code this in myself. I already have a theory of how to code such a thing myself (i’ve already got a Multiple Choice Conversation System running), but I just wanna check if there’s a simpler way to do it first.

There is a simpler way – include Basic Screen Effects by Emily Short, and check the documentation for it. It works like this:

Include Basic Screen Effects by Emily Short

Textdump is a room.

When play begins:
    say "first paragraph[paragraph break]";
    wait for any key;
    say "second paragraph".

Thanks for that, really helpful.

Second thing. Something is a part of my main character. I want him to be able to show that part to an NPC, but when he does it says “that appears to be a part of yourself”. How do I fix this?

[size=115]note: I wrote a rather long post at first and perhaps got a little carried away. A simple solution to this problem is just this:

Instead of showing a tattoo to someone:
	say "describe the tattoo here".

If you’re interested in the original post, it follows…[/size]

What I recommend for solving problems like this is using the ‘rules’ and ‘trace’ debug commands to find out what is going on under the Inform hood when you do a command.

First, with this example code:

The Concholarium is a room.

A tattoo is a kind of thing. A tattoo is part of every person. 

Eco is a man in the Concholarium.

test me with "show my tattoo to eco"

Consider this transcript:

So you see what is firing, and what causes that message, and this suggests a possible solution – modifying the can’t take component parts rule. Where is this rule exactly? The first place to look is in the Index/Actions tab, for the taking action. And looking at the check rules for taking, we see the rule:

So, a quick way to modify this behavior is to modify that rule. For example:

A procedural rule: if the noun is a tattoo then ignore the can't take component parts rule.

Which results in the following transcript:

Now this solution doesn’t seem very good to me, because of that (first taking your tattoo) message, which doesn’t make any sense. I guessed that this message is printed as part of an activity rather than a rule, so I looked in the activities section of the docs (chapter 17), and found a likely candidate – 17.32, Implicitly taking something, since that is basically what’s happening with that message.

The docs say this:

Modifying an activity is similar to the procedural rule, so the first thing to try is something like this:

Rule for implicitly taking something (called the target) when the target is a tattoo:
	try silently taking the target.

And that gives us this better transcript:

At this point I’m satisfied, however there may be other gotchas involved that I haven’t accounted for. I’ll leave it to you to discover these, as well as maybe change what Eco thinks of your tattoo. :slight_smile:

[size=115]and an end note: the thing that made me go back over the post was when I noticed an obvious thing – allowing the implicit take ends up with the tattoo in your inventory, a less than desirable situation. So in this case allowing the show command to run may not be the best thing to do, but the instead rule probably can work for what you want to do.[/size]

Why not just change the tattoo back to being part of the player after showing it to Eco? This line should do it: After showing a tattoo to someone: now the noun is part of the player. (Though, I’m one of those people who has to try everything three times to make it work right because I forget stupid things.)

That will work, but you do need to ensure the showing rule succeeds (by turning off the block showing rule in some manner).