This may be a quick yes or no answer, but now with my NPCs moving simultaneously, I need to have them continue to move while Room messages are displayed. Is there a way to do this??
Here's the code I'm using: (thanks Khris):
// room script file
function room_Load()
{
mouse.UseModeGraphic(eModeWait);
mouse.SetPosition(312, 192);
//mouse.UseDefaultGraphic();
}
function room_AfterFadeIn()
{
SetTimer(1, 400);
}
int delay;
function room_RepExec()
{
if (!cAerialGirl1.Moving && delay) //only check if the NPC isn't moving
{
if (cAerialGirl1.y == 136) cAerialGirl1.Walk(203, 149, eNoBlock, eAnywhere);
else if (cAerialGirl1.y == 149) cAerialGirl1.Walk(204, 136, eNoBlock, eAnywhere);
delay = 0;
}
else if (!delay) delay = 1;
if (!cAerialGirl2.Moving && delay) //only check if the NPC isn't moving
{
if (cAerialGirl2.x == 237) cAerialGirl2.Walk(170, 142, eNoBlock, eAnywhere);
else if (cAerialGirl2.x == 170) cAerialGirl2.Walk(237, 147, eNoBlock, eAnywhere);
delay = 0;
}
else if (!delay) delay = 1;
if (!cAerialGirl3.Moving && delay) //only check if the NPC isn't moving
{
if (cAerialGirl3.x == 303) cAerialGirl3.Walk(235, 144, eNoBlock, eAnywhere);
else if (cAerialGirl3.x == 235) cAerialGirl3.Walk(303, 135, eNoBlock, eAnywhere);
delay = 0;
}
else if (!delay) delay = 1;
if (IsTimerExpired(1))
{
DisplayMessageAtY(0, 20);
DisplayMessageAtY(1, 20);
DisplayMessageAtY(2, 20);
DisplayMessageAtY(3, 20);
cEGO.ChangeRoom(1, 229, 156);
}
}
Everything works that in the code, however I would like for the NPC movement to continue while the messages were displayed. I've searched for a eNoBlock type of condition to put on a textbox/message and can not find anything.
Thanks!
-j
Hmmm, it doesn't seem like that's possible...I've tried using both waypoints and the repeatedly_execute_always() function (a custom one you can call in the global script) which usually ignores blocking functions, but with zero success.
I guess a loophole would be to make a custom GUI screen which will display the message you want it to but without blocking the scripts...so copying your text onto a label and making the GUI visible. It takes a wee bit longer, but certainly do-able!
Thanks geork. I'll give it a try!