Jump to content


Photo

Sleep support


  • Please log in to reply
2 replies to this topic

#1 _247056

_247056

    GMC Member

  • New Member
  • 22 posts
  • Version:GM:HTML5

Posted 04 March 2012 - 09:16 AM

Is the sleep() function not supported in HTML version of GM? I have the below code, which works ok in windows export, but the seep fails to happen in HTML export:

// columns
for(i=0;i<14;i+=1)
{
// rows
for(j=0;j<14;j+=1)
{
if(j==3 || j = 9 || j == 13)
{
sleep(250); // wait here
instance_create(i*32,j*32,objWall);
screen_redraw();
}

} // end inner for


} // end outer for



Also, where is a good guide to what is and is not supported? The docs I have for the HTML5 version seem to be the wrong documentation.

Cheers,
Andy
  • 0

#2 wnsrn3436

wnsrn3436

    GMC Member

  • GMC Member
  • 133 posts
  • Version:GM8

Posted 04 March 2012 - 09:22 AM

var skv_time;
skv_time=current_time
while(skv_time+(/*Time*/)>current_time){}
How do you thinking about this? :happy:
If current_time is available in HTML5 support, do you use it.

Edited by wnsrn3436, 04 March 2012 - 09:26 AM.

  • 0

#3 Mike.Dailly

Mike.Dailly

    Evil YoYo Games Employee

  • Administrators
  • 1488 posts
  • Version:GM:Studio

Posted 12 March 2012 - 06:52 PM

screen_redraw() isn't supported either.....

You simply can't take over the processing loop on most platforms.
  • 0




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users