Adventure Game Studio

AGS Support => Beginners' Technical Questions => Topic started by: on Sat 21/06/2003 00:20:40

Title: Script Q: Display Message special
Post by: on Sat 21/06/2003 00:20:40
how would i script this:

Display a Message in the Color 8, using font 3, in the middle of the screen, at y-coordinate 120.


?

Thanks.
Title: Re:Script Q: Display Message special
Post by: Scorpiorus on Sat 21/06/2003 16:23:10
Create a GUI (named GUIDISPLAY for ex.) and make it a Text Window. Set it's foreground color to 8.
Then once you want to display that specific message:


SetTextWindowGUI (GUIDISPLAY);
SetNormalFont(3);
DisplayAtY (120, "blah blah blah");
SetNormalFont(..); // reset to normal font
SetTextWindowGUI (-1); // reset to the default white box

-Cheers
Title: Re:Script Q: Display Message special
Post by: on Sat 21/06/2003 16:50:42
turning it into a text-window somehow ****'s it up. its height and width go different and i cant change it back. Also, in-game its somehow disturbing another gui (open/save/quit).
Title: Re:Script Q: Display Message special
Post by: Scorpiorus on Sat 21/06/2003 17:50:09
Quoteturning it into a text-window somehow ****'s it up. its height and width go different and i cant change it back.
You should not change it's size. Just convert it to the text window and assign border graphics (eight buttons along the GUI edges).

QuoteAlso, in-game its somehow disturbing another gui (open/save/quit).
What do you mean by disturbing? If you made a new GUI it wouldn't affect another one.

How it goes?
Title: Re:Script Q: Display Message special
Post by: on Sat 21/06/2003 18:24:51
Well, suddenly the Open/Save/Quit GUI got errorous. When i move my mouse over the "QUIT" Button, "Pick UP" will pop up. i made a screenshot:
http://www.surf-guru.de/gui_error.jpg

i cant find where to fix this.
Title: Re:Script Q: Display Message special
Post by: Scorpiorus on Sat 21/06/2003 18:57:57
What exactly GUI you made a text window? You had to make a new one then convert it to the text window.

Did you add any script?

Title: Re:Script Q: Display Message special
Post by: on Sat 21/06/2003 19:00:50
yes i made a new one, and i didnt add a script.
Title: Re:Script Q: Display Message special
Post by: Scorpiorus on Sat 21/06/2003 19:05:05
So you say all you do is made a new GUI, converted it to the text window. Then compiled and run the game. And then you see that messy. Right? What  AGS version?
Title: Re:Script Q: Display Message special
Post by: on Sat 21/06/2003 19:16:53
yes.
Version 2.55 (May'03)

and i am using that lucas-arts template, someone from this board posted.
Title: Re:Script Q: Display Message special
Post by: on Sat 21/06/2003 19:30:02
found the error. in the gui, the load,save and play buttons all had "12" defined as "image", while QUIT for some reason had "23", which is that pick-up image. so i set it to 12 and the problem is gone ;))

but another quick question:

is it possible to alter the order of the rooms ? like lets say u have:
room1
room2
room3

but want to insert a room between 1 and 2, so could you make a new room and change the room-orders ?
Title: Re:Script Q: Display Message special
Post by: Scorpiorus on Sat 21/06/2003 20:00:45
Quotefound the error. in the gui, the load,save and play buttons all had "12" defined as "image", while QUIT for some reason had "23", which is that pick-up image.
hmm, very strange. If you didn't change it's graphic then it means AGS did it itself! Looking at the screenshot I would say AGS could change a sprite.

What is id number of that the text window GUI?

Can you replicate that messy by deleting and making a new text window?

Quotebut another quick question:

is it possible to alter the order of the rooms ? like lets say you have:
room1
room2
room3

but want to insert a room between 1 and 2, so could you make a new room and change the room-orders ?
No, unfortunately it's impossible because rooms are linked to appropriate room files. You have to rename these files if you want to insert a room between. What I would suggest you is to create the rooms so:
room 0
room 10
room 20
room 30

later you could easely "insert" a room between:
room 0
room 1
room 10
room 11
room 12

room 20
etc.

-Cheers