Hi again,
This may not quite be a syntax question, but I'm encountering a problem with the white control line in one of my rooms. Previously, I'd had just a very rough mock up of the rooms, and all control lines seemed to work fine.
The past couple of weeks, I've buckled down and started working on actual backgrounds. All's been great here until working on one outside scene today. After coming up with an improved-but-still-rough start where I could place the entries (player can go west, south, or in a building on the screen), I went ahead and created control lines to cage the ego in and open passage where desired.
Testing it out, I've found that the south white control line only seems to apply when the player is coming from the south room; that is, if I come from the east or out of the building, the user can skip right over the white line and end up in the south room through any point on the lower end of the screen. If, on the other hand, the player has just come from the south room, the white line applies and properly keeps the user confined to the room unless the entry area is used. All of the other lines in this room seem to work as expected regardless of the entry point; it's just this one wall that fails anytime the user comes from one of the other two rooms.
The entry code is identical for all entry points other than positions and loops:
(switch gPreviousRoomNumber
(north
(gEgo posn: 230 142 loop: 2)
)
(west
(gEgo posn: 25 148 loop: 0)
)
(south
(gEgo posn: 198 185 loop: 3)
)
(else
(gEgo posn: 150 130 loop: 1)
)
)
and the exit code is similarly plain:
(method (doit)
(super doit:)
(if (& ctlCYAN (gEgo onControl:))
(gRoom newRoom: 7)
)
(if (& ctlFUCHSIA (gEgo onControl:))
(gRoom newRoom: 5)
)
(if (& ctlYELLOW (gEgo onControl:))
(gRoom newRoom: 6)
)
)
I'm pretty puzzled what the issue could be. I've redrawn the control lines a few times in a few different positions, but I'm finding the same behavior regardless. Any ideas what I could be doing wrong here?