sierra speech style with different expressions?

Started by Shade, Fri 16/09/2005 19:33:57

Previous topic - Next topic

Shade

i am using the sierra speech style and i have about 10 different expressions for the pic of the character. e.g. one when he is angry or one when he is happy...but i can't figure out how to switch this expressions characterspeechviews) during a conversation (dialog or displayspeech) without using 10 different talking views.
i just want to put the talking views (or better the talking pics) into one view and trigger them from there (with settalkingview(char,view,loop) or so). but how can i do that?

Scorpiorus

If I recall correctly, there is currently no way to set a talking loop for the sierra-style speech.

A workaround, as you mentioned, would be to set up 10 different views and toggle between them with the Character.SpeechView property.

Shade

thats bad...really bad... :(... :-[... :'(...
would it be possible to script another speech style that looks like the sierra one but does what i want? its just because i would like to have different expressions for the atmosphere and dont want to have ten different talking views for each character.

Scorpiorus

It would require quite a lot of scripting to just reproduce what's already possible in the AGS engine itself.

I appreciate it would be a good idea to be able to set a speech loop for sierra-style speech (something like this was already suggested before).

You can put other loops for other animations in the speech views to make it so your character would have no more than 10 views in total.

Shade

i think i have found a fairly simple solution. all i need isÃ,  gui and one function:

Code: ags
function Speech(int who, int Face, int Color, const string text){Ã,  Ã,  Ã,  //who is just there to make it easier to see who is speeking
Ã,  SetButtonPic(5, 0, 1, Face); //now i don't need any views!
Ã,  SetLabelColor(5, 1, Color); //characters text color
Ã,  SetLabelText(5, 1, text); //the text is displayed on a label
Ã,  GUIOn(5); //after all the textgui is turned on
Ã,  WaitMouseKey(800); //and stays on till wait is over
Ã,  TextLabel.Text=""; //text is erased
Ã,  SetButtonPic(5, 0, 1, 145); //the pic also
Ã,  GUIOff(5); //and the gui is of
Ã,  }


not very much scripting and it works. and the best thing about that: i don't have to use viewsÃ,  ;D
the other thing is that it doesn't work for dialogs because i haven't done this for dialogs. i think i can work with this.
thx for youre attention.

~}Shade{~

esper

Sounds like whatever you're working on will make a very interesting game. I'm looking forward to.... ummm... whatever it is.... (sorry I can't help, but consider this moral support).
This Space Left Blank Intentionally.

Scorpiorus

Quotei think i have found a fairly simple solution. all i need isÃ,  gui and one function/
Nice one, glad you got it working :)

QuoteSetButtonPic(5, 0, 1, Face); //now i don't need any views!
Ah, your character expression is represented with just a single sprite, I thought you mean at least one loop or two -- now I understand why you tried to be efficient on the number of views it'd take. ;)

Quotethe other thing is that it doesn't work for dialogs because i haven't done this for dialogs.
Yeah, that's what I meant with "quite a lot of scripting" -- the whole built-in speech system spreads throughout various others -- such as dialogs, voice speech support, lipsync and some other that are linked via the game.X global variables.
As for dialogs the simplest approach would be to "run-script N" and then call Speech() from within dialog_request -- would require some work to arrange them though, so that it would be easy to keep track of what speeches for what.

QuoteWaitMouseKey(800); //and stays on till wait is over
By the way, you can make it wait for amount of time corresponding to how long the speech text is:

From AGS tidbits (courtesy of strazer):
...
int gameloops = ((StrLen(text) / game.text_speed) + 1) * GetGameSpeed();
WaitMouseKey(gameloops);
...

That's how AGS calculates the time for how long the speech text should stay on the screen internally.

Shade

i am glad you like it.   :D
its probably not done in the best way but its easy and i can do exacly what i want.

QuoteAs for dialogs the simplest approach would be to "run-script N" and then call Speech() from within dialog_request -- would require some work to arrange them though, so that it would be easy to keep track of what speeches for what.

i totaly forgot the run-script command. then i can use it in dialogs too.  :D

Quoteint gameloops = ((StrLen(text) / game.text_speed) + 1) * GetGameSpeed();
WaitMouseKey(gameloops);

didnt know that. probably i should put it this way.

thx for your "moral support".  ;D

A�rendyll (formerly Yurina)

I was looking for these options too...

How's the coding for dialogs then?

I'm finding it hard to search for the right codes in other codes, so... Could you help me out?
Yuna: Give me a Y!
Rikku: Give me an R!
Paine: Give me a break...
~Final Fantasy X-2

I've been

Scorpiorus

You mean how to run ordinary script commands from dialogs?

In the dialog script you put:

run-script 1
run-script 2
run-script 3
etc.

Then add the following function to the main global script:

function dialog_request(int x) {
}

Now int x represents the number you put after run-script, so:

function dialog_request(int x) {
Ã,  if (x==1)
Ã,  {
Ã,  Ã,  //do what you want when run-script 1
Ã,  }
Ã,  else if (x==2)
Ã,  {
Ã,  Ã,  //do what you want when run-script 2
Ã,  }
Ã,  else if (x==3)
Ã,  {
Ã,  Ã,  //do what you want when run-script 3
Ã,  }
  // etc...

}

SMF spam blocked by CleanTalk