You should have a main loop where code is constantly being executed. In this loop you can have constant button checking. For example:
WHILE 1 '1 or 0 can be used for an infinite loop, otherwise use conditional values/variables B=BUTTON(2) 'BUTTON(2) checks for button presses IF B AND #A THEN BEEP 0 'conditional statement if #A is pressed then it will beep VSYNC 'delays code execution so that all runs smoothly and not super fast WEND 'end of loopThere are other loops that you can use. I personally like WHILE loops but you should use what works best for you! A little advice: I would look into creating user defined functions. They're like creating your own unique commands and they'll help out tremendously in a text-adventure game. Check out this page to learn a little more about them.