NonBlocking Animation problem here

Started by subspark, Tue 09/10/2007 07:34:14

Previous topic - Next topic

subspark

How do I stop my DialogGUI from pausing my object animations? I have a burning fire in the background in a room where you can speak to somebody. Every time the dialog options display, it pauses the fire animation. Argh!  :-\

Cheers,
Paul.

subspark

I've tried a few more things and I'm still left wondering why my animations are being paused by the dialog GUI. There must be something I'm missing.  :'(

Paul.

monkey0506

Using the built-in dialog system has always paused all interactions, animations, etc. The workaround being to use your own dialog system...or deal with it. :-\

Khris

Try to animate it manually in rep_ex_always.

monkey0506

#4
The built-in dialog system blocks everything up to and including repeatedly_execute_always. Don't believe me? Set up a label across the top of the status bar, and a dialog with at least two options. Then put the following in your global script:

Code: ags
int i = 0;

function repeatedly_execute_always() {
  lblBuffer.Text = String.Format("i: %d", i);
  i++;
  }

function on_key_press(int keycode) {
  if (keycode == 'D') dDialog0.Start();
  }


The label is updated until the dialog starts...and then it stops updating. Once you click an option the label starts going again and you can see that it picked up right where it left off...meaning that rep_ex_always was not being run at all.

Gilbert

That's because the dialog system is not a "blocking" function as opposed to the "real" functions. It's another system I think. When a dialog is started the engine is switched to execute this special system, so it takes all control of the game (I think when you "run-script" in a dialog the engine switch temporally back to the originally script running mode).

So currently it is impossible to have aything running in background while a dialog is running (never tested, but I think probably even the automatic background frame animations won't run), unless:
1. Make an alternate "dialog system" completely with script (well I guess someone may have made some similar modules) or a plugin, or
2. Bug CJ to update the dialog system to allow a certain amount of control by the script system in the background (I'm not sure but I think this may cause a rewrite, so it may be a lot of work).

subspark

Well I think with all AGS can do to emulate the original SCUMM system, the dialogs definitely DON'T hold up. 'Pun not intended'
I'll see if I can convince Chris to give the dialog system an overhaul for the next release.

Thanks everybody for being so informative and swift in your response.

Cheers,
Paul.

Pumaman

Dialog.Start() is like Display() in that it completely pauses the game. I wouldn't like to change this behaviour in case people are relying on it, however I do keep meaning to overhaul the dialog system so maybe that's something for AGS 3.01.

subspark

You beauty! Thanks Chris. Would be exceedingly useful!

Cheers,
Paul.

SMF spam blocked by CleanTalk