Scripting game settings

Started by A�rendyll (formerly Yurina), Fri 17/02/2006 09:01:23

Previous topic - Next topic

A�rendyll (formerly Yurina)

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
Yuna: Give me a Y!
Rikku: Give me an R!
Paine: Give me a break...
~Final Fantasy X-2

I've been

Ashen

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:
Quotegame.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: ags

game.text_speed = 10;

(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: ags

SetGameOption(OPT_PORTRAITPOSITION, 3);


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)

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...
~Final Fantasy X-2

I've been

SMF spam blocked by CleanTalk