Adventure Game Studio

AGS Support => Beginners' Technical Questions => Topic started by: Gabarts on Sat 04/01/2014 14:33:04

Title: Dialog+Room script [Solved]
Post by: Gabarts on Sat 04/01/2014 14:33:04
Need help again... :) thanks for your support

It's first time I use dialogs, managed to complete it and is working but I noticed the script for the room keeps running.
I tried to put the code into the dialog, after the last option, but it cannot find oPorta2ap (object for the room) and returns with error.

It gives me this error: Undefined token 'oPorta2ap'

Here the code I have in the room:

Code (ags) Select

  cMarcus1.Say("Si, che c'è Indy?");
  mouse.Visible = true;
  dDialog1.Start();
 
  cMarcus1.LockView(22);
  cMarcus1.Animate(2, 10, eRepeat, eNoBlock);
  Wait(80);
  cEgo.FaceDirection(eDir_Up);
  cEgo.Walk(213, 101, eNoBlock, eAnywhere);
  player.LockView(19);
  player.Animate(3, 3, eOnce, eBlock, eForwards);
  player.UnlockView();
  oPorta2ap.Visible = true;
  aDooropen2.Play();
  Wait(40);


I have this dialog running directly in the cutscene, but I want the action only after the dialog ends, any solutions? Thanks

Title: Re: Dialog+Room script
Post by: Slasher on Sat 04/01/2014 15:01:42
Hi,
QuoteIt gives me this error: Undefined token 'oPorta2ap'
That's because you have to use the Object's ID not the NAME you have given it when using it in Global / Dialogs.
Code (ags) Select

object[1].Visible = true; // Simply amend object number to what oPorta2ap is.



Title: Re: Dialog+Room script
Post by: Khris on Sat 04/01/2014 15:28:09
As for your other problem, either put the commands in the dialog script, before "stop" (indent by at least one space to use standard scripting in dialogs), or put them in a function and call that from the dialog.

We really need eEventDialogHasEnded. Working around that is annoying.
Title: Re: Dialog+Room script
Post by: Gabarts on Sat 04/01/2014 16:49:49
Thanks again, works fine now :)
Title: Re: Dialog+Room script [Solved]
Post by: Gabarts on Mon 06/01/2014 19:49:36
Little ()
I'd like to put font I use for Speech (Monkey Island/FoA style)into the dDialogGUI, where I change that font?

(http://i43.tinypic.com/e0jtcz.jpg)
Title: Re: Dialog+Room script [Solved]
Post by: Khris on Mon 06/01/2014 22:32:04
Change Game.NormalFont in game_start().