new title: "triggering 'having a cutscene' in varying text"

EDIT:
IT IS NOT ABOUT AN INTRO
THE INTRO IS FINE

Hiya! It’s me again!

To decide whether prologue: if the player is in introductionroom, yes; no.

What I want to do is, when “prologue” is true, or at least, when the player is moved to the introductionroom, the game should start doing a script I’ve made. in the sense of this sort of thing:

[code]To decide whether intro:
if the command prompt is "Start a New Game? > ", yes;
no.

After reading a command when intro:
now the command prompt is “>”;
if the player’s command includes “yes/y/new/start”:
center “STARTING A NEW GAME”;
say variable letter spacing;
wait for any key;
otherwise if the player’s command includes “no/n/restore/load”:
say variable letter spacing;
try restoring the game;
otherwise if the player’s command includes “quit/q”:
stop game abruptly;
otherwise:
say fixed letter spacing;
center “HUMAN ERROR”;
say line break;
say fixed letter spacing;
now the command prompt is "Start a New Game? > ";
reject the player’s command;
clear the screen;
…[/code]

but I can’t use that because it wouldn’t be dependent on a command line.

Any help? :frowning:

EDIT:
IT IS NOT ABOUT AN INTRO
THE INTRO IS FINE

When play begins:
    say "Start a new game? >";
    if the player consents:
        [start a new game]
    otherwise:
        [restore a game]

This is the easiest way to ask a yes-or-no question.

I have that, but that isn’t the issue there. I want to run a script-like thingymabob (technical term) that goes on as soon as the player is placed into a special room.

I can do this with command prompts - but I can’t use that. I need it to be linked to the location the player is in.

So you want a rule to fire when the player goes to a specific room?

After going to the Library:
    ...

tried that AND used “instead of going to the library”… neither worked. it shows the room but doesn’t start the script I made.

OKAY it doesn’t have to be a room… it just has to trigger a script WITHOUT a command prompt.

i have a work-around that seems a bit overcomplicated when i put the player in ROOM-1 and ROOM-2 is north of there and “try going north” is combined with “instead of going to room-2” i do something else. so instead of teleporting the player to room 2 (and thus not entering it, i guess, just appearing there) i get the entrance clip anyway. :slight_smile:

problem is, now it’s not letting my other code work. it’s filling in the first command prompt with a Y (because i replied “YES” to the new game question) and that’s bad coding. :frowning:

[rant][code] wait for any key;
now the player is in introductionroom001;
try going north.

Instead of going to introductionroom002:
say default letters;
clear the screen;
say line break;
say line break;
say line break;
say "Ah, this is better! ";
wait for any key;
clear the screen;
say variable letter spacing;
say line break;
say line break;
say line break;
say line break;
say line break;
say line break;
say line break;
say line break;
say default letters;
say “This is [story title].”;
wait for any key;
say line break;
say “All sorts of nonsense will be filled in here which isn’t relevant to the code”;
wait for any key;
clear the screen;
say line break;
say line break;
center “P.A.N.I.C. Creation”;
say line break;
now the command prompt is "What is your family name? > ";
reject the player’s command.

To decide whether collecting lastnames:
if the command prompt is "What is your family name? > ", yes;
no.

After reading a command when collecting lastnames:
if the number of words in the player’s command is greater than 2:
say “[paragraph break]Right now, all I need is just your last name!”;
reject the player’s command;
now the last name of yourself is the player’s command;
clear the screen;
say line break;
say line break;
center “P.A.N.I.C. Creation”;
say line break;
say line break;
say “[fixed letter spacing]name:[unicode 32][unicode 32][variable letter spacing][last name of yourself in title case]”;
now the command prompt is "What is your given name? > ";
reject the player’s command.

To decide whether collecting givennames:
if the command prompt is "What is your given name? > ", yes;
no.

After reading a command when collecting givennames:
if the number of words in the player’s command is greater than 2:
say “[paragraph break]Right now, all I need is just your first name!”;
reject the player’s command;
now the forename of yourself is the player’s command;
now the full name of yourself is the substituted form of “[forename of yourself] [last name of yourself]”;
clear the screen;
say line break;
say line break;
center “P.A.N.I.C. Creation”;
say line break;
say line break;
say “[fixed letter spacing]name:[unicode 32][unicode 32][variable letter spacing][last name of yourself in title case],”;
say line break;
say “[fixed letter spacing][unicode 32][unicode 32][unicode 32][unicode 32][unicode 32][unicode 32][unicode 32][variable letter spacing][forename of yourself in title case]”;
now the command prompt is "Are you a boy? Or a girl? > ";
reject the player’s command. [/code][/rant]

UPDATE:
I crushed my bugs. Saw them driven before me. Heard the lamentations of their women.

There’s an extension Title Page by Jon Ingold that I think does what you want.

i really seriously F***ed up trying to clarify this with an intro thing.

[b]IT IS NOT FOR THE INTRO.

THE INTRO IS FINE.[/b]

it is, however, for additional scenes, like chapter changes and such. those should be nearly-automated scripts, like cutscenes, that will have a lot of story that will vary depending on the actions of the player throughout the story so far.

IT IS NOT ABOUT AN INTRO. I repeat this because IT IS NOT ABOUT AN INTRO.

Matt, I also checked the title page code to see if I could work it into an solution but sadly I don’t see how it would help. It is set up to start up when play begins, and what I need is something that would have play in progress when it’s supposed to fire.

Ah, something like a title screen but for interchapter stuff. You could get the Title Screen to run at other times than when play begins by doing something like this, assuming that arriving at chapter2room is what triggers it:

Every turn when the location is chapter2 room: follow the Title Screen rule.

However this would specifically run the Title Page that’s in that extension and would be kind of annoying to customize. Also, I see that I linked to an out-of-date version of Title Page–it has a procedural rule for crying out loud! The updated version is in the Public Library.

Anyway, if what you want is to clear a screen and display some text without printing a command prompt, that should be pretty easy. Here’s an example. (I hooked the display to “going west from Lab” rather than “Every turn when the player is in Portal” because I didn’t want to print a room heading and description for Portal.)

[code]Include Basic Screen Effects by Emily Short.

Lab is a room. “Something exciting awaits to the west!” A beaker is in the Lab.

Portal is west of Lab.

Someplace Cool is a room. “Obviously I’m not going to implement this.”

After going west from Lab:
say “Something exciting happens! (Press any key.)”;
wait for any key;
clear the screen;
say “Having exited the Lab at [time of day][if the player carries the beaker], with the beaker,[end if] you are transported to, eh, someplace cool. (Press any key.)”;
wait for any key;
clear the screen;
move the player to Someplace Cool.[/code]

Is this like what you’re looking for?

kinda sorta

my workaround works with the move to another room thing, but it shows the room name on my android device in Text Fiction and Xyzzy apps. which I don’t want, of course. :slight_smile: i hide stuff in the game and I’d rather stuff i don’t want shown (but i want used) to not show as much as possible. and I know clear the screen doesn’t work on those apps so … yeah. any chance I can be all like WHEN CONDITION IS MET: do the thing; thing is awesome; wait for any key.?

like a truth state suddenly becoming true and ending a chapter, or a counter that ticks on, or … something? that doesn’t show by default.

I’m not entirely sure what you mean here, but if you mean can you hook it into something that’s not a room, absolutely. Just do something like this:

Every turn when the counter of awesomeness is 5: cool stuff.

I can’t help with the android terps–I don’t have an android. If the room name is showing in the status line one thing to do is temporarily changing the status line so it doesn’t show the room name, but in the IDE I’m not actually getting “Portal” in the status line during the cut scene.

Are you saying you want to trigger a cutscene after entering a special room, but without showing the name of the room at first?

You could do something like this to change the name of the room to “” and hide the room description until the cutscene is over:

[code]Cutscene_over is a truth state that varies. Cutscene_over is false.

First Room is a room.

Special Room is a room. Special Room is north of First Room. “Description of the special room.”

The printed name of Special Room is “[if Cutscene_over is false][otherwise if Cutscene_over is true]SPECIAL ROOM[end if]”.

Instead of looking in Special Room when Cutscene_over is false:
do nothing.

After going north from First Room when Cutscene_over is false:
say “CUTSCENE.”;
now Cutscene_over is true.[/code]

If you want to show the room description immediately after the cutscene is over, you can put “try looking” at the end of the cutscene.

Alternatively, if you want something to happen on a particular turn, you can set up a scheduled event, as in section §9.11 of the manual.

Try Emily’s screen effects extension which has a PAUSE THE GAME command that prompts for enter and clears the screen.

Every turn when the location is the library and the player encloses the book and the bell: Say "Now you get it! All you need now is the candle!"; Pause the game; Now the player is in candle shop.