Dialog and change speech view snag.

Started by barefoot, Sat 18/06/2011 09:35:29

Previous topic - Next topic

barefoot

Hi

UPDATE: I think there may be another talk view snag.. I'm trying to fix.


I have a long intricate dialog and I have come across a slight snag... The character will not talk view when i change his speech view in the dialog. He just lays there and the speech happens but no speech animation.

Part of the script:

Code: ags

// Dialog script file
@S  // Dialog startup entry point
narrator: You now have a decision to make.
return
@1
    cFrankj.SpeechView=10;
Frankj: I won't saw my foot off!! This is madness!!
stop
@2
    cFrankj.SpeechView=10;
Frankj: I need to get out of this clamp and this place!! I will have to saw my foot off!!
 

Even this fails:

Code: ags

// Dialog script file
@S  // Dialog startup entry point
narrator: You now have a decision to make.

return
@1
    cFrankj.SpeechView=10;
    cFrankj.Say("I won't saw my foot off!! This is madness!!");
stop
@2
    cFrankj.SpeechView=10;
    cFrankj.Say("I need to get out of this clamp and this place!! I will have to saw my foot off!!");



Thanks for any solutions.

barefoot


I May Not Be Perfect but I Have A Big Heart ..

Hernald

Try this;


// Dialog script file
@S  // Dialog startup entry point
narrator: You now have a decision to make.
return
@1
    run-script 1
   Frankj: I won't saw my foot off!! This is madness!!
stop
@2
    run-script 1
    Frankj: I need to get out of this clamp and this place!! I will have to saw my foot off!!
stop


Then in the global script;


function dialog_request(int param) {
  if (param == 1)  {
    cFrankj.SpeechView=10;
    }
 

monkey0506

It's possible that you simply can't change the speech view during dialogs, though if that is the case then I would find it a reasonable suggestion to have that behavior changed.

If that is the case, it's not the nicest of workarounds, but you could try creating a clone character who had the alternate speech view set as his speech view prior to the dialog starting, with the same normal view as the other character. Before starting the dialog you would then want to bring said cloned character into the current room at the other character's exact (x, y). You might want to make the clone fully transparent first.

Then in the dialog you could try doing this:

Code: ags
@1
  cFrankj2.Loop = cFrankj.Loop; // where Frankj2 is the clone
  cFrankj2.Transparency = 0;
  cFrankj.Transparency = 100;
  cFrankj2.Say("I won't saw my foot off!! This is madness!!");
  cFrankj.Transparency = 0;
  cFrankj2.Transparency = 100;


Like I said, it's not the nicest/prettiest way of doing it, but if in fact you can't change the speech view while a dialog is running (which I haven't tested mind you), then you could at least try this code (which I also haven't tested! :P).

barefoot


Thanks Monkey and Hernald... if I can't sort it out I may well give the clone idea a bash..

:=

barefoot
I May Not Be Perfect but I Have A Big Heart ..

SMF spam blocked by CleanTalk