Author Topic: Speech view out of order  (Read 573 times)  Share 

Speech view out of order
« on: 13 Jul 2012, 22:36 »
https://dl.dropbox.com/u/87581860/Speech%20view%20problems.png
Code: Adventure Game Studio
  1. // room script file
  2.  
  3. function room_Load()
  4. {
  5. Wait(30);
  6. gInventory.Visible = false;
  7. gDeathMessage.Visible = true;
  8. aExpired.Play();
  9. if (player.PreviousRoom == 2){
  10.   cPortrait.Say("So ein garstiges Gewächs!");
  11. }
  12. }
  13.  
  14.  

Crimson Wizard

  • AGS Project Admins
  • not et suppotreD
    • I can help with translating
    •  
Re: Speech view out of order
« Reply #1 on: 13 Jul 2012, 22:50 »
What is your global game speech setting? I mean Global Settings -> Dialog -> Speech style? I may be mistaken but I have a guess yours is set to Sierra-style?
Please elaborate, what is your aim, how do you want your speech look like? Unless you tell this it will be more difficult to help you.

Re: Speech view out of order
« Reply #2 on: 13 Jul 2012, 23:06 »
What is your global game speech setting? I mean Global Settings -> Dialog -> Speech style? I may be mistaken but I have a guess yours is set to Sierra-style?
Please elaborate, what is your aim, how do you want your speech look like? Unless you tell this it will be more difficult to help you.
Hmmm... that was a good hint! I changed the general settings into Lucasarts (i never noticed i changed them to Sierra Transparent).
This lifted the first problem, i guess AGS wanted to create some sort of portrait for me.
But still, the problem with the character portrait remains.
I want something that is exactly like this:
http://www.youtube.com/watch?v=l_xLZnA3wiw&feature=g-vrec

Crimson Wizard

  • AGS Project Admins
  • not et suppotreD
    • I can help with translating
    •  
Re: Speech view out of order
« Reply #3 on: 13 Jul 2012, 23:14 »
Actually I hoped that would solve second problem as well :) A pity it did not.

Alright, this is only a guess, since frankly I don't remember how this works pretty well. But I think that Speech View requires to have all the loops for all directions (left, right etc). And portrait character is turned to some direction it does not have appropriate loop for.
Actually (regardless if that is the case) I won't recommend using SpeechView for the portrait character. I'd rather recommend using Character.Animate function.

Re: Speech view out of order
« Reply #4 on: 13 Jul 2012, 23:49 »
Jes i considered the problem with the diffrent directions thats why i set up these loops as well.
If i use Character.Animate, will i be able to just play the speech file (sound file) in the background just as easily as with the Say function???

Crimson Wizard

  • AGS Project Admins
  • not et suppotreD
    • I can help with translating
    •  
Re: Speech view out of order
« Reply #5 on: 14 Jul 2012, 00:00 »
If i use Character.Animate, will i be able to just play the speech file (sound file) in the background just as easily as with the Say function???
Ah... probably not (unless you make it a normal audio clip). :/

Hmm, well, I am out of ideas for now. You said that:
Quote
the portrait in my game does not talk at all
Do you mean it does not animate or that say lines do not appear? Or both?

Khris

  • Evil Dark Emperor Death-Kill
    • Lifetime Achievement Award Winner
    •  
    • I can help with play testing
    •  
    • I can help with scripting
    •  
    • I can help with translating
    •  
Re: Speech view out of order
« Reply #6 on: 14 Jul 2012, 00:17 »
This is probably a dumb question, but just to make sure: is player.PreviousRoom actually 2?
http://whathaveyoutried.com/

The other day on yahoo answers:
"Can you print colored images with black ink? If so tell me how please Thanx Kimberly"

Re: Speech view out of order
« Reply #7 on: 14 Jul 2012, 17:29 »
This is probably a dumb question, but just to make sure: is player.PreviousRoom actually 2?
Yes, previous Room is #2.
But honestly the "previous room" is not a good solution. Just emagine if there are rooms (and there are) in which several death scenes occure... how wouldi i program the diffrent lines the portrait sais? I need a better solution for this.
Also to answer Crimson Wizards question:
The protrait does not talk at all, neither does it moove its libs nor does the speech appear.

Crimson Wizard

  • AGS Project Admins
  • not et suppotreD
    • I can help with translating
    •  
Re: Speech view out of order
« Reply #8 on: 14 Jul 2012, 17:54 »
But honestly the "previous room" is not a good solution. Just emagine if there are rooms (and there are) in which several death scenes occure... how wouldi i program the diffrent lines the portrait sais? I need a better solution for this.
Well, this one is a simple one. Make a global variable, preferrably of enum type, like:

GlobalScript.ash:
Code: Adventure Game Studio
  1. enum DeathType
  2. {
  3.    eDeadByFallingIntoPit,
  4.    eDeadByDrinkingPoison,
  5.    eDeadByGettingTooCloseToNuclearExplosion,
  6.    etc...
  7. }
  8.  
  9. import DeathType LastDeathType; // declare a variable
  10.  
GlobalScript.acs:
Code: Adventure Game Studio
  1. DeathType LastDeathType; // create a variable
  2. export LastDeathType; // allow other scripts use it
  3.  

Set variable each time character dies, e.g.:
Code: Adventure Game Studio
  1. LastDeathType = eDeadByFallingIntoPit;
  2.  

Then for the death room:
Code: Adventure Game Studio
  1. function room_Load()
  2. {
  3. Wait(30);
  4. gInventory.Visible = false;
  5. gDeathMessage.Visible = true;
  6. aExpired.Play();
  7.  
  8. if (LastDeathType == eDeadByFallingIntoPit){
  9.   cPortrait.Say("I should be more careful!");
  10. }
  11. else if (...)
  12. ... etc...
  13.  



I am still thinking on your main problem... I'll post if I get any ideas.
« Last Edit: 14 Jul 2012, 17:57 by Crimson Wizard »

Khris

  • Evil Dark Emperor Death-Kill
    • Lifetime Achievement Award Winner
    •  
    • I can help with play testing
    •  
    • I can help with scripting
    •  
    • I can help with translating
    •  
Re: Speech view out of order
« Reply #9 on: 15 Jul 2012, 02:53 »
I just remembered this : http://www.adventuregamestudio.co.uk/yabb/index.php?topic=45643
What happened to that?
http://whathaveyoutried.com/

The other day on yahoo answers:
"Can you print colored images with black ink? If so tell me how please Thanx Kimberly"

Re: Speech view out of order
« Reply #10 on: 15 Jul 2012, 14:35 »
Well actually this is the main "problem".
Back at the time we spoke about this i was working on another game. But the difference is that there i had a diffrent image and text appearing after the scene. Now, here i want another monolog to be triggered. I dont quite know how to deal with that change.
Also if i apply the scripting, then there is a problem with the "player_Loop". If i press the "restart" button then the room changes into the previous room (as wanted) but the playercharacter just wont show up. I have looked at it over and over again... But i cant find the mistake (as this has actually nothing to do with the speech of the protrait).
I could send all the scripting i have but i thinkg it would be another topic?

ThreeOhFour

  • Order of the Maggot
  • AGS Baker
  • Wild colonial boy.
  • ThreeOhFour worked on a game that was nominated for an AGS Award!ThreeOhFour worked on a game that won an AGS Award!
Re: Speech view out of order
« Reply #11 on: 15 Jul 2012, 19:11 »
Two things.

Firstly, I am not sure why you have a speech portrait character. If you want a character to have a speech portrait, you need to assign their speech view to be the portrait's view number. Having a seperate character set up as your speech portrait is kinda pointless (unless I've misunderstood you). If you just meant that you wanted a portrait in the death room, then that's a fine way of going about it.

Secondly, the character is saying what you've asked them to say, but you never see it because you have specified the event to occur before the room fades in. If you actually want to be able to see the speech, you need to trigger the event after the room fades in. Use function room_AfterFadeIn rather than function room_Load to fix this.

As for your last issue, once again there could be a whole number of reasons why this is happening. Without seeing some code, we're powerless to help you. Have you checked that you've not used "First time player enters room" to set things up, thereby negating the script the second time you visit? Have you remembered to reset everything such as player view, transparency and coordinates when they enter the room?

Also, unless you really need it, and as much as I like the number, I advise against using room 304 for anything. Unless it's been changed and I am unaware of this, AGS doesn't save room states beyond room 300, so you're best to use rooms below this number unless you really need more than that.

Crimson Wizard

  • AGS Project Admins
  • not et suppotreD
    • I can help with translating
    •  
Re: Speech view out of order
« Reply #12 on: 15 Jul 2012, 19:19 »
Firstly, I am not sure why you have a speech portrait character.
It is not a nomral speech view, it is a character image during the "death" sequence.

Secondly, the character is saying what you've asked them to say, but you never see it because you have specified the event to occur before the room fades in. If you actually want to be able to see the speech, you need to trigger the event after the room fades in. Use function room_AfterFadeIn rather than function room_Load to fix this.
Now, that's something I missed :) maybe I confused room_Load with room_FirstLoad. But yes, this is likely the reason of the problem.

Also, unless you really need it, and as much as I like the number, I advise against using room 304 for anything. Unless it's been changed and I am unaware of this, AGS doesn't save room states beyond room 300, so you're best to use rooms below this number unless you really need more than that.
It is a death sequence room, it does not need to be saved, as far as I understood that.
Or... can it be you just don't like him using number 304? :D

ThreeOhFour

  • Order of the Maggot
  • AGS Baker
  • Wild colonial boy.
  • ThreeOhFour worked on a game that was nominated for an AGS Award!ThreeOhFour worked on a game that won an AGS Award!
Re: Speech view out of order
« Reply #13 on: 15 Jul 2012, 19:24 »
Aye, it's unlikely that one would need a saving state room for this, but in the event that one wanted to do this it could lead to some confusion as to why it doesn't work.

Seems best to avoid this possible complication if the option is present, basically.

Re: Speech view out of order
« Reply #14 on: 18 Jul 2012, 20:59 »
Code: Adventure Game Studio
  1.   In the Global Script ash. I have this:
  2. enum CauseOfDeath {
  3.     eDeathTree,
  4.     eDeathSwamp
  5. };
  6.  
Code: Adventure Game Studio
  1.  
  2. import function ShowgDeathGui(CauseOfDeath cod);
  3.  
  4. import function ShowDeathGUI(CauseOfDeath cod);     //i have been told to do this
  5. String death_message[100];                        //Death message text
  6. int death_picture[100];                           //Death message image
  7.  
Code: Adventure Game Studio
  1.   function ShowgDeath (CauseOfDeath cod){
  2.   lblDeathMessage.Text= death_message[cod];
  3.   gDeathMessage.Visible = true;
  4.    }
  5.  
The next thing, of which I hoped it would do the most important part I have under the function (on mouse click):
Code: Adventure Game Studio
  1.  
  2. else if (button == eMouseLeft) {
  3. ProcessClick(mouse.x, mouse.y, mouse.Mode );
  4. }
  5. else if (button == eMouseLeft) {
  6. player_loop = player.Loop;
  7. player_x = player.x; player_y = player_y;
  8. player_room = player.Room;
  9. ProcessClick(mouse.x, mouse.y, mouse.Mode );
  10. }
  11.  
Code: Adventure Game Studio
  1.  
  2. gDeathMessage.Visible = false;
  3. player.Loop = player_loop;
  4. player.ChangeRoom(player_room, player_x, player_y);
  5.  
Code: Adventure Game Studio
  1.  
  2. function region2_WalksOnto()
  3. {
  4. if (Zbirdfree == 0){
  5. oBaum.SetView(4, 0);
  6. player.Walk(291, 317, eBlock, eWalkableAreas);
  7. player.FaceLocation(341, 129, eBlock);
  8. oBaum.Animate(0, 10, eOnce, eBlock, eForwards);
  9. cBellatrix.LockViewFrame(3, 0, 0);
  10. oBaum.SetView(4, 1);
  11. oBaum.Animate(1, 10, eOnce, eBlock, eForwards);
  12. Wait(60);
  13. player.UnlockView();
  14. oBaum.SetView(4, 0, 1);
  15. player.ChangeRoom(304);
  16. }
  17. SetTimer(1, 420);
  18. }
  19.  
  20. function room_RepExec()
  21. {
  22. if (IsTimerExpired(1)){
  23. oBaum.SetView(4, 0);
  24. player.Walk(291, 317, eBlock, eWalkableAreas);
  25. player.FaceLocation(341, 129, eBlock);
  26. oBaum.Animate(0, 10, eOnce, eBlock, eForwards);
  27. cBellatrix.LockViewFrame(3, 0, 0);
  28. oBaum.SetView(4, 1);
  29. oBaum.Animate(1, 10, eOnce, eBlock, eForwards);
  30. Wait(60);
  31. SetTimer(1, 420);
  32. player.UnlockView();
  33. oBaum.SetView(4, 0, 1);
  34. player.ChangeRoom(304);
  35. }
  36. }
  37.