My goal is to make a really simple game where the player goes back and forth between 3 rooms, with different dialogue each time they enter the room. The code I have so far (which isn’t working) is:
house is south of school. “[if the house is unvisited]a two story brick house on a main road. the backyard is littered with trees and a small playground. cars speed past house often, ignoring the speed limit sign. it’s time for school. type ‘n’.[end if][if the house is visited]you are in house. school is to the north.[end if]”
school is west of classroom. “[if the school is unvisited]you’re at school. the walls are white cinderblock and the fluorescent lights tint your skin translucent. the hallways are too small for the number of people that go here. as you make your way through school, you’re shoved around by backpacks and shoulders. type ‘e’ to enter your classroom.[end if][if the school is visited]you are in school. classroom is to the east and the house is to the south.[end if]”
classroom is a room. “[if the Classroom is unvisited]you met a new friend here a few months ago. you have 1st period psych with her and the friend that introduced the two of you. you enter the classroom and they look you up and down, ostensibly annoyed by your presence. you’re sure it’s nothing, but can’t help but feel like they’re angry, like you’ve done something wrong. because of this, you decide to walk home, skipping the rest of your classes. to get back to the school entrance, type ‘w’.”
going back to house is a recurring scene.
going back to house begins when the player is in the house for the second time.
going back to house ends when going back to school begins.
when going back to house begins:
say “you were at school for one class. just go back. type ‘n’.”
going back to school is a recurring scene.
going back to school begins when the player is in the school for the second time. say “back at the enterance. to walk home, type ‘n’.”.
going back to school begins when the player is in the school for the third time. say “back at school. don’t want to be here. don’t know what else to do. you float through the day, make it to 2:30. time to go home. type ‘n’.”;
going back to school ends when going back to house begins.