Adventure Game Studio

AGS Support => Advanced Technical Forum => Topic started by: j-Hed on Mon 19/04/2004 10:50:29

Title: BUG in dialogs!
Post by: j-Hed on Mon 19/04/2004 10:50:29
Hello Again!

I have found what I believe is a bug.
In the "dialog script" I can't make it run-script AFTER something have been said,
for example:

@2  // option 2
run-script 1 <-------- THIS ONE WORKS PERFECTLY!!!
CAP: &42 Don't disturb me at work!
run-script 1 <-------- BUT THIS ONE DOESN'T WORK AT ALL!!!
goto-dialog 0  

Have anyone else tried this?
Thanks!
Title: Re:BUG in dialogs!
Post by: j-Hed on Mon 19/04/2004 10:53:53
I have also noticed that the same thing happens when an Animation should be run after DisplaySpeech.
Title: BUG IN Dialogs!
Post by: j-Hed on Mon 19/04/2004 10:59:57
Hello Again!

I have found what I believe is a bug.
In the "dialog script" I can't make it run-script AFTER something have been said,
for example:

@2 // option 2
run-script 1 <-------- THIS ONE WORKS PERFECTLY!!!
CAP: &42 Don't disturb me at work!
run-script 1 <-------- BUT THIS ONE DOESN'T WORK AT ALL!!!
goto-dialog 0

Have anyone else tried this?
Thanks!
Title: Re:BUG IN Dialogs!
Post by: Gilbert on Mon 19/04/2004 11:22:17
Hey, no need to start 2 topics in two different forums.

I'm not really familiar with dialogs, but did you tried adding a return after the first run-script? (if that's what you want to do).
Title: Re:BUG IN Dialogs!
Post by: j-Hed on Mon 19/04/2004 11:29:48
well an animation (run-script 1) should be run before and after CAP says something. The problem is it will only play before and nothing happens after he speaks.

I have also noticed the same problem with DisplaySpeech then run an animation, the animation won't run.
Title: Re:BUG in dialogs!
Post by: Rocco on Mon 19/04/2004 16:31:17
i think you forgot -> ""
try
CAP: "Don't disturb me at work!"
Title: Re:BUG in dialogs!
Post by: Ben on Mon 19/04/2004 18:13:39
You don't need quotation marks in dialog scripts. Only in Display...() and similar commands..
Title: Re:BUG in dialogs!
Post by: Kweepa on Mon 19/04/2004 19:47:57
You seem to already have a thread about this.
I'm be pretty surprised if this is a bug in the dialogs though, and not in your understanding of how they work.

To test this, put all your code in one run-script, with a
DisplaySpeech(CAP, "&42 Don't disturb me at work");
in the middle, and see if it works then.

So your dialog script should look like this

@2 // option 2
run-script 1
goto-dialog 0
Title: Re:BUG IN Dialogs!
Post by: Pumaman on Mon 19/04/2004 21:07:31
I'll look into it. An easy workaround would be to just set it to:

run-script 2

and then have script 2 do something like:

dialog_request(1);
DisplaySpeech(CAP, "&42 Don't disturb me at work!");
dialog_request(1);
Title: Re:BUG in dialogs!
Post by: Scummbuddy on Mon 19/04/2004 21:36:27
{topic merged} yes please dont string topics all throughout the forum. ive never been on a board where doing that helps you, instead of getting you made fun of.  just a word of advice.
Title: Re:BUG in dialogs!
Post by: j-Hed on Tue 20/04/2004 10:10:57
Hey thanks for the advices!

Sorry 'bout the double thread it wasn't my/our intension, I didn't see that my brother already posted in the beginners forum. Won't happen again. :)

Well I guess it works if you put the speech between the animations in Dialog_request run-script, but then I have to do it on every thing [CAP] says. That will make plenty of dialog requests.
Does run-script work for anyone else if you put it after a speechline?
I have never got it to work after a speechline (in the dialog script) I've even tried:
AnimateCharacter(CAP,0,5,0);
while (character[CAP].animating) Wait(10);

But it just skips the Anim. :-\


Title: Re:BUG in dialogs!
Post by: Gilbert on Tue 20/04/2004 10:16:16
Try using AnimateCharacterEx() instead, it has a blocking parameter so you don't need the while-wait treatments.
Title: Re:BUG in dialogs!
Post by: j-Hed on Tue 20/04/2004 22:51:44
I tried AnimateCharacterEx but it didn't work either.
Thanks for the tip though.

Does this function(e.g. NPC: Hello!
                                   run-script 1)
work on your AGS?

Title: Re:BUG in dialogs!
Post by: strazer on Tue 20/04/2004 23:13:33
I have just tested it and it works flawlessly. He animates, then says his line, then animates again. I'm using the latest beta.

Are you sure you're using the dialog_request & AnimateCharacterEx functions correctly? Why not post your actual code here?

Edit: My rundialog runs from global script.
Title: Re:BUG in dialogs!
Post by: Pumaman on Tue 20/04/2004 23:19:40
Where is the dialog being run from?

Does putting the  RunDialog  in the global script have different behaviour from a room script, and from the "Run a dialog" interaction command?
Title: Re:BUG in dialogs!
Post by: j-Hed on Wed 21/04/2004 00:12:55
Oh! Thanks A lot Gilbot, AnimateCharacterEx now works when I put:

AnimateCharacterEx(CAP,0,5,0,0,0);
   while (character[CAP].animating) Wait(10);

Thanks Everyone for your help!!! :D  
Title: Re:BUG in dialogs!
Post by: strazer on Wed 21/04/2004 00:18:33
I don't get it.
What's the difference to your previous

AnimateCharacter(CAP,0,5,0);
while (character[CAP].animating) Wait(10);

if you don't set AnimateCharacterEx's last parameter to 1?