Script delay():
delay = 500000;
while(delay>0) {
delay = delay -.1;
}
Room 1:
Contains object_a -> On left mouse click, load room 2.
Room 2:
Contains object_b -> On create, run the following:
draw_set_color( c_blue );
draw_set_font( font0 );
draw_set_halign( fa_center );
draw_set_valign( fa_center );
for(a=0;a<=4;a=a+1)
{
for(b=0;b<=3;b=b+1)
{
draw_text( 400, 400, string(a) + '-' + string(b));
delay();
}
}
Now, I would think that upon clicking on object_a, the game would load room2, load object_b, run the create script, which SHOULD iterate through the for loops, drawing a-b in each iteration, delaying in between.
What happens, is that I click on object_a, and it seems that the delays happen before room 2 is even loaded, and then "snap", room 2 loads and all of the drawing happens at one time.
I've tried substantially increasing the delay, which just increases the time before the "snap" happens. I've tried using sleep. Same thing.
Can someone explain to me whats going on here? This should be able to be executed as simple as this...











