If understand it correctly, you use hintsilent in an infinte while loop to display debug monitor and want hint messages to pop up during some events. In this case I'd recommend this (it's a rough sketch, might contain some syntax errors):
Initialize debug monitor loop:
Code:
debug_loop = 1; // this variable controls appearance of debug monitor (on/off). It must be global!
debug_loop_function = {
while {debug_loop == 1} do {
if (debug_loop == 0) exitwith {/*May be left empty*/}; // check if command to terminate debug monitor was executed, if not continue
/*your debug monitor code */
sleep 1; // make sure to always halt loops for some time.
};
};
call debug_loop_function;
When you need a hint message to pop up, disable debug monitor loop:
Code:
debug_loop = 0;
sleep 5; // wait till debug disappears
/*your hint code */
sleep 5; // wait till hint disappears
debug_loop = 1; // turning debug on
call debug_loop_function; // calling function with debug loop
The only problem would be that you can't immediately get rid of debug monitor because hint and hintsilent take some time to disappear, so you'll have to delay your messages.
As for the last question, I think the code for it should be in the very bottom of Raiin menu. If I remember it right, he creates a loop and checks if button was pressed, if condition is true then function is executed. To hide menu pressing Esc is enough.
Also, keep in mind that a lot of things have been fixed since initial alpha release, so plenty of useful script functions do not work. Some may even report you for a later manual ban. But what you have so far should be ok. Use your leaked build only for basic things and examination of general structure of the game.