Repeating scene

This doesn’t seem to be working:

Basically, Horse Taming is a scene in which a black horse appears. You are given 4 turns to tame the horse, and if you don’t, it runs away (goes in limbo). But then comes back later.

Granted, my code for placing the horse back in limbo after it runs away may be at fault, but I just want to make sure that “or” condition above for starting a scene is legal.

The scene-starting condition should be okay as stated, if the conditions you specified are verifiable. For example, this works fine:

[code]The testarea is a room.

A marble is in the testarea.

A chair is in the testarea. The chair is an enterable supporter.

Progress is a scene. Progress begins when the marble is carried by the player or the chair is the holder of the player.

When Progress begins:
say “Hooray for progress!”.[/code]

Just out of curiousity, are you trying to use the word “limbo” as a direct synonym for “off-stage”? If so, that won’t work.

Limbo is a container off stage. The horse goes into it after running away, but doesn’t start out in it (so that the first condition will work).

I’m going to take your example and substitute a limbo container in, just to make sure. But yeah… looks like the problem might be somewhere else. Thanks Endosphere.

Do you mean that the scene runs once but you can’t get it to repeat? If so, you have to define the scene as a recurring scene. By default scenes will not run more than once unless they are declared recurring (see manual chapter 10.7).

Do you mean that the scene runs once but you can't get it to repeat? 

Ah, yes, that is what I mean. Thanks for the advice Nitku.

I can only assume that this is not valid?

Horse Taming begins when Horse Taming ends.

I put in debugging statements so that I would know when Horse Taming began and ended. It ended alright, but did not restart.

I used scene-ends for both conditions because the compiler told me that at least one of the conditions for a recurring scene had to be the end of a scene and because it didn’t work with another kind of condition, either.


This worked, and it’s more what I wanted anyway:

Horse Taming begins when Horse Taming has ended for 4 turns. 


It only repeated once!! ERG!!

I can see why it won’t repeat more than once, I guess. It begins when it has ended for 4 turns, and that’s that. When it has begun and ended again, it has ultimately ended for more than 4 turns, I guess, and never fires again.

What I need is a scene that will repeat over and over until the horse is “tamed”, but will stop doing so after that.

10.7 only describes 2 recurring scenes that follow each other continually, like Night and Day. I’m not sure if other sorts of repeating are allowed.

Currently I’m going to go ahead and try to alternate Horse Taming with an insignificant scene that might as well repeat. But a more concise implementation would be preferred.

I’m not sure I understand what you need. Here you say:

… but upthread you have:

It seems to me you’ve got two mutually exclusive options playing out here. Either you want a scene that continues until something happens, or a scene which plays out, ends, and then repeats until something happens. You can’t repeat a scene until it has ended. Sorry if I just misunderstand you.

I was playing around with the general idea you proposed and wrote the following. I’m not sure if it’s exactly what you had in mind, but perhaps it will be helpful in shedding some light on the underlying issues.

[code]The Prarie is a room. The description of the Prarie is “An endless vista of tall grass sways in a gentle breeze coming down from the hills on this fine summer day.”.

The description of the player is “You’re as fine a pioneer as ever lived.”.

Some grass is in the Prarie. The grass is scenery. The description of the grass is “A soft blanket of verdant grass covers the surrounding prarie.”.

Whistling is an action applying to nothing. Understand “whistle” or “hum” as whistling.

Report whistling:
say “As a lovely vision of Wilma Lee fills your mind, you decide to get back to work. If only you can beat that darn Willison at the whistling championships, Wilma Lee will certainly see that you’re a man who’s going places in this world.”.

A horse is a male animal. The description of horse is “[unless tamed]A mysterious stallion who seems to embody the free spirit of the prarie[otherwise]A friendly horse. He looks a lot like Seabiscuit[end if].”. Understand “stallion” or “wild horse” or “wild stallion” as horse. The printed name of a horse is “[if the horse is untamed]wild stallion[otherwise]horse[end if].”

Horse can be tamed or untamed. Horse is untamed.

After examining the horse for the first time:
say “For some reason you remember a discussion you once had with an old trapper you met up on the mountain one day. He told you that while a broken horse may make a good pack-animal, a friendly horse will reliably stand by your side forever. He added that making friends with a wild horse usually takes some persistence.”.

Petting is an action applying to one thing and requiring light. Understand “pet [something]” or “stroke [something]” as petting.

Check petting:
unless the noun is the horse:
say “That seems silly.” instead.

Report petting the tamed horse:
say “You give the stallion a friendly scratch behind his ear, which he seems to enjoy.”.

Report petting the horse for the first time:
say “You concentrate on projecting an aura of kindness, and after a moment the horse stands still and allows you to approach. You lightly scratch the side of his neck, and then he backs away.”.

Report petting the horse for the second time:
say “The proud animal stands still for a moment and allows you gently stroke his mane.”.

After petting the horse for the third time:
now the horse is tamed;
say “You playfully scratch the horse’s side, and then he turns his head and sniffs your hair. Apparently you’ve made a new friend.”.

Instead of touching the horse:
try petting the horse.

Limbo is an enterable container. Horse is in limbo.

When play begins:
say “You’ve come to the prarie to relax and practice your whistling–you’ve been working on a doozy of a tune in preparation for the upcoming regional whistling championships, but you’re desperately aware you need to improve your technique if you’re going to beat that rascal Bill Willison this year.”.

Every turn:
unless the player can see the horse:
say “You fill the prarie with an ethereal melody as you whistle.”;.

Horse Taming is a recurring scene. Horse Taming begins when the holder of Horse has been limbo for four turns and Horse is untamed.

Horse Taming ends when the location of Horse has been the Prarie for four turns and Horse is untamed.

When Horse Taming begins:
move Horse to the Prarie;
if the player can see Horse:
say “You feel a subtle vibration in the earth, and suddenly [unless the horse is tamed]a mysterious[otherwise]the wild[end if] stallion gallops into view.”.

When Horse Taming ends:
if the player can see Horse:
say “The wild stallion gallops off toward the hills.”;
move Horse to limbo.[/code]

So the horse will keep running back and forth between limbo until he is tamed, after which he will stay in the prarie with the player. The “whistling” stuff is just to give the player something to do while he’s waiting around for the horse.

Skinny Mike,

You are correct in that I’ve contradicted myself. It comes from changing my mind repeatedly about how to implement the problem and thus how to end the scene.

I want the horse to gallop into view for the first time after a certain event. That works.

I want the horse to hang around, waiting to be tamed, for a few turns and then run away if player has failed to tame him.

I want him to come back after a bit if player has failed to tame him, because I’m not trying to punish the player forever for not immediately figuring out the puzzle.

So as long as horse isn’t tamed, the cycle of horse coming and going should repeat. But after he’s tamed, no more coming and going.

Endosphere: thanks for the code. I will play around with it and see how it works out.

Maybe you should give the horse-taming scene two endings: a successful ending and an unsuccessful ending. See Writing with Inform, section 10.8. Then you can have Horse Taming end unsuccessfully when the horse runs away and successfully when it’s tamed, and only let it begin again when it ended unsuccessfully.

Hey that sounds useful, Emerald, and intuitive to read. I will check it out.