A negative number in wait indicates seconds.
Are you sure you have waited that many time seconds before taking the desicion that the functions never continues??
Are you sure that the value you to time is not something 100 or 1000 or so??
Did you try wait(-10); once??
Can you please give the arguments that you give to the function
An Example Working Code(Extract from my app):
PANEL * Splashscreen =
{
bmap = SplashscreenImage;
alpha = 100;
flags = TRANSLUCENT;
}
////////////////////////////////////////////////////////////////////////////////////////////////////
void VideoStartup ()
{
video_mode = 10;
video_screen = 1;
mouse_mode = 4;
master_vol = 100;
}
////////////////////////////////////////////////////////////////////////////////////////////////////
int main ()
{
VideoStartup ();
wait_for(VideoStartup);
var time = 5;
wait(-t1ime);
Splashscreen.scale_x = screen_size.x / bmap_width(SplashscreenImage) - 0.04;
Splashscreen.scale_y = screen_size.y / bmap_height(SplashscreenImage);
wait(-time);
while(Splashscreen.alpha > 0)
{
Splashscreen.alpha -= 5;
wait(0.01);
}
reset(Splashscreen,SHOW);
bmap_purge(SplashscreenImage);
return 0;
}