Help on creating a house-plan

I was going to implement coding a house for my game, except for the dilemma that I’d have to create a separate code for each room that the MC (main character) visits. The MC’s house is supposed to have a bathroom, two bedrooms and a living room as well as the variable for going upstairs and downstairs. How does one ensure that there is a constant variable for visiting all the rooms in the house? has plans for all sorts of houses that you can view for free.
EDIT: Whoops, misread your post.

Personally II would setup true and false. If they enter a room for the first time:
*set room_1 true
*set room_count +1
And if the house has 10 rooms:
*if (room_count=10)
*goto all_rooms

Is one way you can handle it.

1 Like

Do you want the game to acknowledge when youve entered a room to make sure they enter all of the rooms?

In that case just do a true false variable for each room like Lordirish showed.

Do you want the ability to just walk around the house freely but for the player to only walk from one room to an adjacent (no going into the attic from the front door)?

In this case just do a *gosub for each room which returns to either the upstairs or downstairs hallway.

I had rooms you could enter in my little minigame “Hide and Seek” if you want to see the code for that (although its a little bulky)

Link here: (Hide and Seek (updated 10/12) (WIP))