Author Topic: Scripting game settings  (Read 206 times)  Share 

Aėrendyll (formerly Yurina)

  • Back from the dead.
Scripting game settings
« on: 17 Feb 2006, 09:01 »
And again I have a problem.

How do I script globalInts, like text speed?

The manual didn't give any clear options, so I ask here.

I want to make a GUI which gives the player the opportunity to change the text speed, the brightness of the screen and the position of the portraits of characters.

How do I do this?

Thanks in advance,
~Yurina
« Last Edit: 17 Feb 2006, 11:09 by Ashen »
Yuna: Give me a Y!
Rikku: Give me an R!
Paine: Give me a break...
<i>~Final Fantasy X-2</i>

I've been

Ashen

Re: Scripting global Ints
« Reply #1 on: 17 Feb 2006, 11:09 »
These aren't exactly GlobalInts - they're more like game parameters. There are Global Ints (as in the Get/SetGlobalInt commands), which might be confusing you, but that has nothing to do with what you want.

How you'd adjust them in-game depends on what exactly it is you want to change. To deal with the specifics examples you gave:
Text Speed:
This page is sort of hidden away, but contains a lot of variables you might find useful, specifically:
Quote
game.text_speed
How long speech text stays on the screen. Default 15, higher number means shorter time.

Which you'd set like any int, e.g
[code]
game.text_speed = 10;
[/code]
(This should've been found searching the manual for 'text speed'.)
You may also be interested in game.skip_display (same page), and SetSkipSpeech(..).

Screen Brightness:
AFAIK, you can't actually change this in AGS. SetAmbientTint(...) is the closest I can think of. (Someone tell me if I've missed something obvious.)

Portrait Position:
You mean their speaking views, in Sierra-style speech? You can only really pick from the same options as are on the General Settings window (Left, Right, Alternate, Based on X pos), and you do it using SetGameOption(..), e.g.
[code]
SetGameOption(OPT_PORTRAITPOSITION, 3);
[/code]

For anything else READ THE MANUAL, as much of it as you can, and familiarise yourself with the functions and properties, and what they do.
I know what you're thinking ... Don't think that.

Aėrendyll (formerly Yurina)

  • Back from the dead.
Re: Scripting game settings
« Reply #2 on: 17 Feb 2006, 11:41 »
I've read the manual, tried getting the game settings done, but it didn't work out...

Thanks for the help Ashen.

About the screen brightness: I'm doing this for people who play under dim light or who can't bear too bright screens. It's not required, but it's a nice addition in my opinion.
Yuna: Give me a Y!
Rikku: Give me an R!
Paine: Give me a break...
<i>~Final Fantasy X-2</i>

I've been