Adventure Game Studio

AGS Support => Beginners' Technical Questions => Topic started by: SLaMgRInDeR on Mon 23/02/2004 19:53:52

Title: Text displayed upon game start
Post by: SLaMgRInDeR on Mon 23/02/2004 19:53:52
I couldn't find this in the AGS help file so i'll ask here, how do i display text from the rooms messages upon starting the game? i put the basic DisplayMessage in, but i think it confused it because it needed somthing before it.
Title: Re:Text displayed upon game start
Post by: Scummbuddy on Mon 23/02/2004 20:13:32
room messages? or global messages?

DisplayMessage
DisplayMessageAtY
Title: Re:Text displayed upon game start
Post by: SLaMgRInDeR on Mon 23/02/2004 20:17:36
Room message

I used Display message and it said "unexpected 'DisplayMessage' "

When you start the game the i want a message to appear from a character who is offscreen (and you never actualy see) saying "Captain! we need you down here! Hurry!"

how can i do this?
Title: Re:Text displayed upon game start
Post by: Scummbuddy on Mon 23/02/2004 20:20:47
DisplaySpeechAt
DisplaySpeechAt (int x, int y, int width, CHARID, string message)

Similar to DisplaySpeech, except that the text is displayed with its top left corner at (X,Y), in an area WIDTH wide.
You can use this function to write the character's speech text anywhere you like, and AGS will still play the character's talking animation and so on if appropriate.

NOTE: This function does not support QFG4-style speech.

Example:

DisplaySpeechAt (220, 20, 100, EGO , "My name is ego");

will display the message in the top right corner of the screen, and play the character's talking animation.
See Also: DisplaySpeech, DisplaySpeechBackground

Title: Re:Text displayed upon game start
Post by: SLaMgRInDeR on Mon 23/02/2004 20:24:49
and it dose the exact same thing exept says "unexpected 'DisplaySpeechAt' "

btw whatis supposed to be in the speech marks where it says "my name is ego" because the text that is displayed is already programmed in the room's message editor
Title: Re:Text displayed upon game start
Post by: Scummbuddy on Mon 23/02/2004 20:29:45
you are probably typing outside of a function.  go to your room. then the "i" button for room interactions, then up will pop a screen. click on the player enters screen after fade in, then choose

Game- Display a message
pick the message you want it to be., and then edit the message there to what it should be. this wont be in character color, so if you want that, then youll have to do some real scripting, which is not hard
Title: Re:Text displayed upon game start
Post by: Gilbert on Tue 24/02/2004 01:39:26
I suppose you're putting these Display... functions in the game_start() function, this is not allowed, as when this function is executed, no room data was loaded yet, so it is the very start of the execution of the game, and you cant do much apart from setting up some parameters, disabling/enabling some GUIs and the like there.

To have a message displayed at "game start", just throw that DisplayWhatever line in the "Player enters room after fade-in" function of that first room script.