Adventure Game Studio

AGS Support => Beginners' Technical Questions => Topic started by: on Sun 24/04/2005 03:06:32

Title: 2D Arrays and Hiding Speech Text
Post by: on Sun 24/04/2005 03:06:32
Hello, I have a couple (hopefully simple) questions:

1. How can you create a two-dimensional array?Ã,  I tried "int myArray[3][3]", but the compiler complained, and it didn't like "int* myArray[3]" either.

2. How can you turn off the text when characters speak?Ã,  (Since I'm using sound files, displaying the speech text is redundant, and I'd like to give users the option to disable it.)

3. In screens where the player character exits by going through a door at the back of the screen (i.e. moving away from you), I've been having problems with walkable areas.Ã,  To get the character to walk through the door, I have to click the exact right spot, rather than anywhere in the vicinity.Ã,  When exiting via side doors, this is not a problem.

Thanks so much for your help!

Greg
Title: Re: 2D Arrays and Hiding Speech Text
Post by: strazer on Sun 24/04/2005 05:50:08
1.) Multi-dimensional arrays are currently not supported (directly) so you have to work around it.
Take a look in the Technical Archive for solutions.

2.) SetVoiceMode

3.) How do you change rooms? When the player walks onto a region or hotspot or when you click on the door?
Not everybody does things the same way so please elaborate on how you do it (room setup, code examples etc.).
Title: Re: 2D Arrays and Hiding Speech Text
Post by: on Mon 25/04/2005 03:57:43
Thanks.

3. The room is changed when the player walks onto a region.  (The walkable area onto that region is toggled on and off, based on whether the door is open or closed.)
Title: Re: 2D Arrays and Hiding Speech Text
Post by: strazer on Mon 25/04/2005 04:18:56
Yeah, that's nice, I do it the same way and it works fine.

By "the exact right spot", do you mean the location of the region?
If you click outside a walkable area, the character should walk as far on the walkable area as he can. Why he would only do that on side doors and not back doors I don't know.