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".
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?
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".
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!