help "check for dialogues start and stop"

Started by rmonic79, Thu 18/12/2014 21:17:48

Previous topic - Next topic

rmonic79

Hi guys, is there a way to check if the dialogue is running?
like
Code: ags
if (dPlayer is running) {
                do some stuff}
 or          if (dPlayer is stopped){
                do other stuff}

thank you for the answers.

Cassiebsg

May I ask what you are trying to do?

If dialog is running and you want something to happen, then your best bet is the just add the commands inside the dialog, if you want some BG stuff going at the same time it's a bit more complex (I don't know exactly how, but do a forum search. It has been answered not too long along... this week I believe).

As for when the dialog is stopped, I normally check for a particular dialog option and to see if it has been selected, but there's about (at least) 3 different ways to check for dialog ending.
There are those who believe that life here began out there...

rmonic79

Quote from: Cassiebsg on Thu 18/12/2014 22:08:20
May I ask what you are trying to do?

If dialog is running and you want something to happen, then your best bet is the just add the commands inside the dialog, if you want some BG stuff going at the same time it's a bit more complex (I don't know exactly how, but do a forum search. It has been answered not too long along... this week I believe).

As for when the dialog is stopped, I normally check for a particular dialog option and to see if it has been selected, but there's about (at least) 3 different ways to check for dialog ending.

i would avoid to repeat for any option the same code in the dialogue
like
Code: ags

// Dialog script file
@S  // Dialog startup entry point
return
@1
  cUomobar.LockView(33);
  cDonnabar.LockView(53);
Uomobar:sdfsdfs sdgfsdfsdf sdf sdfgsdfgsdfgs sdgf sdgsdgsdfgs
  cUomobar.UnlockView();
  cDonnabar.UnlockView();
stop


i'm wondering if there is a command  that lock views on start dialogue and release  them when the dialogue stops working on global dialogue and not within the single options.

Cassiebsg

You can add the code at the start like this:

Code: ags

    // Dialog script file
    @S  // Dialog startup entry point
      cUomobar.LockView(33);
      cDonnabar.LockView(53);
    return
    @1
    Uomobar:sdfsdfs sdgfsdfsdf sdf sdfgsdfgsdfgs sdgf sdgsdgsdfgs
    return
    @2 // exit option
    Uomobar: Goodbye...
      cUomobar.UnlockView();
      cDonnabar.UnlockView();
    stop


You can also do this:

Code: ags

function cUomobar_Interact()
{
      cUomobar.LockView(33);
      cDonnabar.LockView(53);
      dUomobar.Start();
}


And unlock the view inside the dialog... or you can check if the exit option (2) of the dialog has been chosen and if so, then unlock the view.
I would put the code inside the dialog. But maybe someone else has a better suggestion for you. 8-)
There are those who believe that life here began out there...

rmonic79

Quote from: Cassiebsg on Thu 18/12/2014 22:48:33
You can add the code at the start like this:

Code: ags

    // Dialog script file
    @S  // Dialog startup entry point
      cUomobar.LockView(33);
      cDonnabar.LockView(53);
    return
    @1
    Uomobar:sdfsdfs sdgfsdfsdf sdf sdfgsdfgsdfgs sdgf sdgsdgsdfgs
    return
    @2 // exit option
    Uomobar: Goodbye...
      cUomobar.UnlockView();
      cDonnabar.UnlockView();
    stop


You can also do this:

Code: ags

function cUomobar_Interact()
{
      cUomobar.LockView(33);
      cDonnabar.LockView(53);
      dUomobar.Start();
}


And unlock the view inside the dialog... or you can check if the exit option (2) of the dialog has been chosen and if so, then unlock the view.
I would put the code inside the dialog. But maybe someone else has a better suggestion for you. 8-)

thanks :)

SMF spam blocked by CleanTalk