What the heck is going on? There's nothing wrong (at first glance) with my room code as it's exactly the same as another game's rooms I have, but what's happening is I walk to the edge of the room and change to the next room, but then immediately I switch back to the last room, and then immediately switch back to the second room again, and back and forth forever. I even changed the gEgo's X position to be 310 instead of the standard 319. And then to 300. And then to 200. But it seems like the gEgo posn code is being ignored. I threw in a DebugPrint to confirm that the ego's X position was what I set it to and it is being set. It's just being ignored. Any ideas?
EDIT: I decided to repeat the DebugPrint command further down after the previous room number states with the rest of the inits and it does seem to be resetting the Ego's position to 316 and not 200. Why is this happening?
(switch gPreviousRoomNumber
(west
(gRoom style: dpOPEN_SCROLL_LEFT)
(gEgo posn: 10 (gEgo y?) loop: 0)
)
(east
;(gRoom style: dpOPEN_SCROLL_RIGHT)
(gEgo posn: 200 (gEgo y?) loop: 1)
(DebugPrint {X = %d} (gEgo x?)) ;Says gEgo x is 200, good.
)
(else
(self style: (| dpOPEN_PIXELATION dpANIMATION_BLACKOUT))
; Set up ego view and loop (direction)
;(SetUpEgo -1 0)
(gEgo
setScale: Scaler 100 55 75 40 ; theFrontSize theBackSize theFrontY theBackY
posn: 167 63
loop: 2
get: 0
)
(Portcullis
posn: 160 7
setStep: 2 3
ignoreControl: ctlWHITE
setScript: gateScript
)
(gateScript changeState: 1)
)
)
(super init:)
(gEgo init:)
(Portcullis init:)
(DebugPrint {X = %d} (gEgo x?)) ;Says gEgo x is 316????
)