Is it possible to let an animation run during a dialog?
NPC1 needs to walk from point A to point B and back, like a loop.
But when the player character starts a dialog with let's say NPC2,
NPC1 stops walking and wait (or freeze) until that dialog has ended.
After that, he continue walking again.
Is there a way to keep him moving during the dialog?
So, somehow the walking animation is blocked until the dialog has ended...
Try setting Run game loops while dialog settings are displayed option on General settings page.
Thanx for your answer CrimsonWizard but it still doesn't work. :'(
Some better explaining:
I have one conversation in dialogs-0: dDialog0 which have both "show" and "say" active.
I also have this RepExec in the roomscript:
function room_RepExec()
{
if (!cBird.Moving)
{
if (cBird.x == 190)
{
cBird.Walk(400, 163, eNoBlock, eAnywhere);
}
else
{
cBird.Walk(190, 163, eNoBlock, eAnywhere);
}
}
if (!cKeen.Moving)
{
if (cKeen.x == 190)
{
cKeen.Walk(400, 190, eNoBlock, eAnywhere);
}
else
{
cKeen.Walk(190, 190, eNoBlock, eAnywhere);
}
}
}
Even with "Run game loops while dialog settings are displayed" option set as True on General settings page: when I click on cKeen to start the dialog, cKeen and cBird only finish the part of the loop [.walk] they are doing for that moment and when finished they wait for when the dialog will end. Only then they both restart there walking loop again.
Is there no way to keep for example cBird moving because that one has nothing to do with the dialog? ???
OK, this is how it should be [thanx many times Ben304 ;)]:
function room_RepExec()
{
}
function repeatedly_execute_always()
{
if (!cBird.Moving)
{
if (cBird.x == 190)
{
cBird.Walk(400, 163, eNoBlock, eAnywhere);
}
else
{
cBird.Walk(190, 163, eNoBlock, eAnywhere);
}
}
if (!cKeen.Moving)
{
if (cKeen.x == 190)
{
cKeen.Walk(400, 190, eNoBlock, eAnywhere);
}
else
{
cKeen.Walk(190, 190, eNoBlock, eAnywhere);
}
}
}
Well, actually that will be useful to know; I am not a pro at AGS scripting yet :)
So, it's repeatedly_execute_always function that does that trick?
Yep, repeatedly_execute_always runs even while you've got something blocking running, such as Arjon had with his dialog.
See here (http://www.americangirlscouts.org/agswiki/Predefined_global_script_functions#repeatedly_execute_always) in the manual :)