Text displayed upon game start

Started by SLaMgRInDeR, Mon 23/02/2004 19:53:52

Previous topic - Next topic

SLaMgRInDeR

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.

Scummbuddy

room messages? or global messages?

DisplayMessage
DisplayMessageAtY
- Oh great, I'm stuck in colonial times, tentacles are taking over the world, and now the toilets backing up.
- No, I mean it's really STUCK. Like adventure-game stuck.
-Hoagie from DOTT

SLaMgRInDeR

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?

Scummbuddy

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

- Oh great, I'm stuck in colonial times, tentacles are taking over the world, and now the toilets backing up.
- No, I mean it's really STUCK. Like adventure-game stuck.
-Hoagie from DOTT

SLaMgRInDeR

#4
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

Scummbuddy

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
- Oh great, I'm stuck in colonial times, tentacles are taking over the world, and now the toilets backing up.
- No, I mean it's really STUCK. Like adventure-game stuck.
-Hoagie from DOTT

Gilbert

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.

SMF spam blocked by CleanTalk