Okay, I’m not here to bore you with a description of the game I’m working on or any other irrelevent stuff. Here’s the situation:
I’ve got a couch, right? A particularly squeaky one, that squeaks whenever you sit down on it or stand up from it. Therefore, I put in an “after” routine to illustrate this squeakitude to the player. Sitting down on the couch (entering it) produces the desired message (“the couch makes a squeak as you sit down”, basically). However, when I tell it to do pretty much the same thing with getting off the couch (or exiting it), I run into an annoying snag: when the player types “stand”, “stand up”, “out”, “exit”, “get off”, or “get up”, the game simply says the default “You get off the couch.” Only when he/she types “exit couch” is the desired response (“the couch squeaks as you get up”) printed.
So, yeah, what do I do? Normally I’d let this slide, but I intend to add several different puzzle-important phrases related to entering/exiting the couch, and the standard “you get off the couch” just won’t do.
Here’s the code, if anyone would be so kind as to point out my (likely very glaring) mistake:
Object couch_breakroom "couch" breakroom with name 'couch' 'sofa', initial "The break room's new couch sits, squat and utilitarian, against the wall.", description "This particular couch isn't really anything special, and in truth, has a long way to go before it can live up to the legacy of the break room's previous couch. It's way too squeaky, constantly moaning and groaning whenever anyone sits on it.", after [; Enter: print "The couch makes a nauseating, high-pitched groan as you sit down.^"; return true; Exit,GetOff: print "The couch makes a disquieting groan as you stand up from it.^"; return true; ], has static supporter transparent enterable;
Massive, massive props to any and everyone who helps me out here; this is my first true Inform 6 game.