Speech Speed [SOLVED]

Started by Nickydude, Sat 27/12/2008 00:15:44

Previous topic - Next topic

Nickydude

I have a character saying "Empty Pots." which is obviously a short speech. How can I keep the speech text on screen for longer? Is there an equivalent of something like "SpeechDisplaySpeed="?
Best Regards,
Nickydude
www.madladdesigns.co.uk

AGS Beginner's Guide - All you'll ever need!

Ghost

#1
game.text_speed is the command you need. You can read it up in the manual; the default is 15 and smaller numbers mean that the text is displayed longer. I usually set it to 8. Just set your value in game_start, and you should be fine.

If you don't want to change the text speed at all, and just want such short lines to stay onscreen longer, you can also go and add a character.Say("..."); after a very short sentence. "..." is never displayed by AGS, it counts as a "pause".

Nickydude

#2
Thank you Ghost. :)

Edit: I tried the cego.say("...") (as I just want short lines to stay longer) and it does pause, but after the text has disappeared. The display length for the text is exactly the same. Here's the full function:

Code: ags
function hPots_Look()
{
  cEgo.Walk(375, 315, eBlock, eWalkableAreas);
  cEgo.Say("Empty pots.");
  cEgo.Say("...");
  //Wait(80);
  cEgo.FaceLocation(352, 378, eBlock);
  cEgo.Say("I guess there was something in them but not anymore.");
}


The idea being he looks at the pots, then after a brief period he turns to the screen and say's something else. I just need shorter text to stay longer on the screen. I'm I using it in the right place?
Best Regards,
Nickydude
www.madladdesigns.co.uk

AGS Beginner's Guide - All you'll ever need!

Creator

#3
The problem is that you're displaying the pause after the character's line. I don't think Ghost's second method would work at all in any condition. Try this:

1. Remove the code Ghost gave you from game_start

2.
Code: ags

function hPots_Look()
{
  game.text_speed = 10; //Makes speech stay on screen longer, but you can make it lower if you want
  cEgo.Walk(375, 315, eBlock, eWalkableAreas);
  cEgo.Say("Empty pots.");
  //Wait(80);
  cEgo.FaceLocation(352, 378, eBlock);
  game.text_speed = 15; // Set text speed back to it's default setting.
  cEgo.Say("I guess there was something in them but not anymore.");
}


Is that what you were after?

Nickydude

#4
Thanks, but I get this:

Failed to save room room1.crm; details below
room1.asc(14): Error (line 14): '.text_speed' is not a public member of 'Game'. Are you sure you spelt it correctly (remember, capital letters are important)?


text_speed isn't in the drop down list after typing Game. :(

I take it Game.text_speed can't be set per room and has to be set overall?
Best Regards,
Nickydude
www.madladdesigns.co.uk

AGS Beginner's Guide - All you'll ever need!

Creator

#5
Check your grammar. It's game, not Game. Small 'G'. Programming languages are fussy about that stuff.  ;) As the error says: (remember, capital letters are important).

Nickydude

Doh! Thank you Creator.

Best Regards,
Nickydude
www.madladdesigns.co.uk

AGS Beginner's Guide - All you'll ever need!

Ghost

Quote from: Creator on Sat 27/12/2008 12:35:05
I don't think Ghost's second method would work at all in any condition.

It would, and would also be "quicker" than changing the global text setting twice, but each to his own taste ;)

Nickydude

Quotegame.text_speed is the command you need. You can read it up in the manual; the default is 15 and smaller numbers mean that the text is displayed longer. I usually set it to 8. Just set your value in game_start, and you should be fine.

So would the '8' speed be for all texts? What about long texts, would the size of long texts override the '8'?
Best Regards,
Nickydude
www.madladdesigns.co.uk

AGS Beginner's Guide - All you'll ever need!

Trent R

Quote from: Nickydude on Sat 27/12/2008 12:03:43
Edit: I tried the cego.say("...") (as I just want short lines to stay longer) and it does pause, but after the text has disappeared. The display length for the text is exactly the same.
I could be wrong, but I was under the impression that to get a line to display longer, you put
Code: ags
  cEgo.Say("Empty pots....");


~Trent
To give back to the AGS community, I can get you free, full versions of commercial software. Recently, Paint Shop Pro X, and eXPert PDF Pro 6. Please PM me for details.


Current Project: The Wanderer
On Hold: Hero of the Rune

Ghost

Quote from: Nickydude on Sat 27/12/2008 23:07:36So would the '8' speed be for all texts? What about long texts, would the size of long texts override the '8'?

game.text_speed sets the speed for the whole game, so it would change the speed for all characters. Think of the value as a "base time per letter". With a text speed of 8, each speech will stay on-screen about twice the time as with a speed of (default) 15.
If you find the whole timing too messy, another option's to go to General settings and
under "Dialogs", set "allow speech to be skipped by which events" to any option that doesn't include timer (so mouse click, keyboard key, or both of them). Just make sure you mention this in your game's readme ;)


fernewelten

This is a very old thread, but I've been pointed to it by Google after vainly searching the editor internal documentation for quite some time. It is in there, all right, but hard to find if you don't know what you are looking for.

I'm assuming that others will be pointed to this thread by Google, too. So, for all late comers that face the same problem as me and the original poster, be told that the current best solution is changing Game.MinimumTextDisplayTimeMs, as in
Code: ags
Game.MinimumTextDisplayTimeMs = 2000;


The value is milliseconds and is a minimal time that each Say string will be displayed on-screen (unless the gamer waves it away). So the code above makes each Say command take at least 2 seconds.

For details, see the in-editor documentation for "Game / global functions", or "Game.MinimumTextDisplayTimeMs", respectively.

ManicMatt

Brilliant, thank you! I was advised to manually change the length of a sentence (Not the actual sentence itself, but the time it's onscreen), and then change it back to standard length, everytime someone said a short sentence, like "Hello!", so I assumed this was the only solution.

SMF spam blocked by CleanTalk