I need to have a overlay in the screen until you press a key or left mouse button. I've managed to make a timed overlay, but I need to replace the wait command with a key press, right? Can you help me?
This is my script, with the wait command:
int over1;
over1 = CreateGraphicOverlay(0,0,45,1);
Wait(200);
RemoveOverlay(over1);
Thanks.
Firstly, what version of AGS are you using? As of 2.7, the way Overlays work has changed, and you'll want to use Overlay.CreateGraphical (http://www.adventuregamestudio.co.uk/manual/Overlay.CreateGraphical.htm) instead. (The old style still works, as long as you don't check the 'Enforce object-based scripting' option, but you should probably update anyway.)
Secondly, have you tried reading the manual? WaitMouseKey() (http://www.adventuregamestudio.co.uk/manual/WaitMouseKey.htm) might be what you want.
Thanks, it works and I've updated the script for the new command type. ;D