MegaGryphon
MegaGryphon

Reputation: 31

Checking room type and player state before entering room in Inform 7

In this game rooms are private or public, and the player has two states, A or B. Th player can only enter a public room while in state A, but not state B. This is what the desired effect is, but after typing this:

A person can be A or B. A person is usually A.

A room can be private or public. A room is usually public.

Check entering public room:
     if player is B:
            say "You can't do that." instead.

Inform acts like the last block of text doesn't even exist. What am I doing wrong?

Upvotes: 3

Views: 415

Answers (1)

JJJ
JJJ

Reputation: 33153

The entering action applies only to entering containers or supporters. Moving around the map is the going action.

Check going to public room when the player is B:
    say "You can't do that." instead.

Upvotes: 4

Related Questions