Adventure Game Studio

AGS Support => Beginners' Technical Questions => Topic started by: Seventeen Uncles on Mon 15/09/2014 15:05:48

Title: where do you add/change whole game functions?
Post by: Seventeen Uncles on Mon 15/09/2014 15:05:48
hi everyone, I know this is the beginner forum but apologies for such a silly question.

was looking for a way to extend the minimum amount of time short text displays for (ie "Hi!") and found the AGS manual entry for Game.MinimumTextDisplayTimeMs which is exactly what i need.

I cant however find out where you add or change these game-wide script funtions?

any help will be appreciated!

Thanks
Title: Re: where do you add/change whole game functions?
Post by: Gurok on Mon 15/09/2014 15:09:00
Putting it in your game_start function in your GlobalScript.asc should be enough. You can add this function if you don't already have it:

function game_start()
{
    Game.MinimumTextDisplayTimeMs = 5000;
}


game_start gets run as soon as the game starts (before the first room is loaded).
Title: Re: where do you add/change whole game functions?
Post by: Seventeen Uncles on Mon 15/09/2014 15:36:57
Quote from: Gurok on Mon 15/09/2014 15:09:00
Putting it in your game_start function in your GlobalScript.asc should be enough. You can add this function if you don't already have it:

function game_start()
{
    Game.MinimumTextDisplayTimeMs = 5000;
}


game_start gets run as soon as the game starts (before the first room is loaded).

ah brilliant, found it and works perfect, thanks for your help.