Still desperately need help with a scene command?

Hi there,

I’m working on a code for a class and it’s due really soon and I’m a bit stressed. My original problem was that I couldn’t get a scene to begin with an NPC carrying 3 items. It seems like the code is accepted now as:

Witchy is a scene. Witchy begins when the witch carries Willow Eye and the witch carries the deck of cards and the witch carries the dog collar. Witchy ends when the Witch is not in Witch’s Lair.

But when I try to advance my story by saying:

Every turn when Witchy is happening:
say “‘text here’”;
let the way be the best route from the location of The Witch to the Witch’s Lair;
try the Witch going the way.

NOTHING happens. The Witch still stays right there holding all 3 items. No text appears. I’m roadblocked and stressed. Any ideas would be appreciated.

This version works for me? Have you verified that Witchy successfully starts?

raw code
Lab is a room. The Witch's Lair is south of the Lab.

Witchy is a scene.

Witchy begins when play begins.

The witch is a person in Lab.

Every turn when Witchy is happening:
	say “‘text here’”;
	let the way be the best route from the location of The Witch to the Witch’s Lair;
	try the Witch going the way.

Test me with "z".

Step 1: Make sure your rule is actually running. Add a “say” in there that you can watch for in the output.

Step 2: Make sure there’s actually a route there. Say the way before going it. Make sure it’s not “nothing”.

Step 3: Make sure the going isn’t blocked. Turn on >ACTIONS and watch what the witch tries to do.

Good luck!

2 Likes

You could also try the SCENES command to make sure the scene is actually happening.

2 Likes

I find it helpful to add something like this to code while troubleshooting scenes:

every turn:
	repeat with act running through scenes:
		if act is happening, say act;
		say line break;

you can repeat through scenes and check all kinds of stuff

4 Likes

Okay I did this and I totally found the root of my problem but have stumbled into another one. I want a scene to begin when the Witch is no longer in play, but I can’t phrase it in a way that works I don’t think. I tried making it start when she’s no longer in that location, but since she doesn’t start there the game interprets her initial location as being “not there” and makes the scene begin then. Any ideas?

The witch starts in a room, right? Did you try begins when the witch is offstage?

That worked perfectly! Thank you!

Although I’ve now noticed the Witch doesn’t get moved offstage when I say she is removed from play, is there another way I should phrase it?

I think the usual way is now the witch is nowhere or maybe now the witch is off-stage.

2 Likes

When I try this, exit the room, and reenter, she is still there:(

Okay, but what if you don’t exit the room and re-enter and instead just LOOK?

The same:( it says she’s still here.

Then it sounds like your rule to remove her from play didn’t run.

1 Like

I suspect you didn’t intend the not here:

Witchy ends when the Witch is not in Witch’s Lair.

This works as I’d expect:

witch's lair is a room.
tunnel is west of witch's lair.
cave is west of tunnel.
forest copse is west of cave.
witch is a person in forest copse.
witch holds willow eye. Witch holds deck of cards.
dog collar is in forest copse.

last every turn: say "The witch is in [location of the witch].".

every turn when witch does not carry dog collar and witch can touch dog collar:
try witch taking dog collar.

Witchy is a scene.
Witchy begins when the witch carries Willow Eye and the witch carries the deck of cards and the witch carries the dog collar.
Witchy ends when the Witch is [not] in Witch’s Lair.

Every turn when Witchy is happening:
let the way be the best route from the location of The Witch to the Witch’s Lair;
say "Witch go [way].";
try the Witch going the way;

test me with "scenes / z / z / z / z".
1 Like

In the future, it’s easier to start new threads every time a new problem arises (if it’s not connected to the previous one). I promise you’re not clogging the threads with your questions!

3 Likes

What’s the exact text of the rule that includes moving her offstage? Maybe the rule isn’t being followed.

The debug commands rules, actions, and scenes can shed a lot of light on what’s happening.

2 Likes