Overlay

Started by alimpo83, Sun 24/09/2006 14:41:52

Previous topic - Next topic

alimpo83

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.

LIMPO ARTS

Ashen

#1
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 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() might be what you want.
I know what you're thinking ... Don't think that.

alimpo83

Thanks, it works and I've updated the script for the new command type. ;D
LIMPO ARTS

SMF spam blocked by CleanTalk