Adventure Game Studio

AGS Support => Beginners' Technical Questions => Topic started by: SeamanNaranja on Sat 29/10/2011 15:29:52

Title: Thinking view and Sierra-style dialogue
Post by: SeamanNaranja on Sat 29/10/2011 15:29:52
I have a problem with the coding of my first game. I reckon this is beginner stuff, but I couldn't find anything about it in the manual or on the forums.

I'm using Sierra-style speech for dialogues in my game. At the same time I use the Think-function when my character interacts or looks on something outside the dialogues. I have a thought bubble over his head for this. But when I assign the thinking view to him the animation of him thinking pops up as a character picture in the sierra dialogue!  ??? It looks like this:

(http://dl.dropbox.com/u/1620952/bug.png)

I have drawn and assigned animated sequences for every loop in the view, so that's not the problem...
Title: Re: Thinking view and Sierra-style dialogue
Post by: Khris on Sat 29/10/2011 16:16:19
Are you sure that what AGS does isn't explained right here:
http://www.adventuregamestudio.co.uk/manual/Character.Think.htm ?

I've never used thinking views so I can't be of any more help, but it sounds like you didn't set the "thought uses bubble GUI" option.
Title: Re: Thinking view and Sierra-style dialogue
Post by: SeamanNaranja on Sat 29/10/2011 16:38:56
Quote from: LeKhris on Sat 29/10/2011 16:16:19
Are you sure that what AGS does isn't explained right here:
http://www.adventuregamestudio.co.uk/manual/Character.Think.htm ?

I've never used thinking views so I can't be of any more help, but it sounds like you didn't set the "thought uses bubble GUI" option.


There is no "Thought uses bubble GUI" option in the general settings. But there is a "Custom Thought bubble GUI". This one is set to my bubble gui. The weird thing is, if I don't have a thinking view assigned to the main character the thought bubble pops up like it should over his head as it should. If I assign a view it reverts to Sierra-style.

Judging by the manual there doesn't seem to be a way to get the ThinkView to work the "LucasArts" way while using Sierra-style dialogues:

Quote from: ManualIf you are using Sierra-style speech and the character doesn't have a thinking animation, the thought bubble will be displayed in lucasarts-style.

If the "Thought uses bubble GUI" setting has been set, then the thought will be displayed like normal speech, except that the bubble GUI will be used for the window background. In Lucasarts-style speech this means above the character's head, in Sierra-style it will be done along the top of the screen as normal.

The reason I'm using the ThinkView is that I want him to make a speak-animation like in most LucasArts-games, while I want the Sierra-style dialogue for dialogues.
Title: Re: Thinking view and Sierra-style dialogue
Post by: Khris on Sat 29/10/2011 17:10:22
Then the only thing left to do is write a wrapper:

void MyThink(this Character*, String message) {
  SetSpeechStyle(eSpeechLucasarts);
  this.Think(message);
  SetSpeechStyle(eSpeechSierra);
}
Title: Re: Thinking view and Sierra-style dialogue
Post by: SeamanNaranja on Sat 29/10/2011 17:46:54
Quote from: LeKhris on Sat 29/10/2011 17:10:22
Then the only thing left to do is write a wrapper:

void MyThink(this Character*, String message) {
  SetSpeechStyle(eSpeechLucasarts);
  this.Think(message);
  SetSpeechStyle(eSpeechSierra);
}


Where do I put the code? I wrote it in the Global Script, but then nothing seems to happen.

Yours truly, the n00b  :-[
Title: Re: Thinking view and Sierra-style dialogue
Post by: Khris on Sun 30/10/2011 11:04:44
It doesn't work automatically, you have to use it like this:
  player.MyThink("blah");
To be able to use it in room scripts, too, put this in the global header (global script.ash):

import void MyThink(this Character*, String message);
Title: Re: Thinking view and Sierra-style dialogue
Post by: SeamanNaranja on Sun 30/10/2011 13:22:20
It works!  :D

Thank you. The ThinkView animation plays nicely once, but I'd like it to loop for the duration of the thought bubble. This way it looks like he is talking for the whole duration of the message.

I looked it up in the forum, but couldn't find anything else than this unanswered thread: http://www.adventuregamestudio.co.uk/yabb/index.php?topic=43710.0 (http://www.adventuregamestudio.co.uk/yabb/index.php?topic=43710.0). Do you know how it could be done?