Adventure Game Studio

AGS Support => Beginners' Technical Questions => Topic started by: Jakerpot on Mon 16/03/2009 00:54:29

Title: How to make a diary, wich the player can type in?
Post by: Jakerpot on Mon 16/03/2009 00:54:29
Hey folks, how can i create a box where the player can write some notes to help through the game. In my game the player has a diary, wich has all the objectives and tips to the player, and i wanted to add a chapter when the player can type in the book. Some help please?
Title: Re: How to make a diary, wich the player can type in?
Post by: RickJ on Mon 16/03/2009 01:42:09
Perhaps http://www.adventuregamestudio.co.uk/yabb/index.php?topic=27158.0 this is what you seek?
Title: Re: How to make a diary, wich the player can type in?
Post by: Jakerpot on Mon 16/03/2009 02:19:56
yeah, maybe, but i wanted to do the journal as a room, and then maybe a transparent GUI just with the label to the player type into it, so i don't have to make a whole new GUI, just a tranparent one with a label. Thank you! But this thread is still open for ideas (any idea now KhrisMUC? TrentR?)!!!!
Title: Re: How to make a diary, wich the player can type in?
Post by: RickJ on Mon 16/03/2009 03:45:43
Well, if you had a journal room you would still need to draw a background so why not just use the background for the GUI instead.   If you wanted to make the journal the same size of the screen you could make your GUI that size.   If myou wanted a transparent GUI with journal text over the current room I don't see why the module couldn't be used as is or modified to suit your purposes?

I think if you investigate a little morfe you may find what you are looking for has already been 90% done for you.
Title: Re: How to make a diary, wich the player can type in?
Post by: Dualnames on Mon 16/03/2009 08:07:10
Quote from: Jakerpot on Mon 16/03/2009 02:19:56
(any idea now KhrisMUC? TrentR?)!!!!

TrentR has become a legend around these places.. ;)GJ mate.
Title: Re: How to make a diary, wich the player can type in?
Post by: RickJ on Mon 16/03/2009 11:44:34
@Jim:  Yeah, I know a regular "Sir Postsalot" but if I kindly tell him to just read enough time he may do so one fine day?   I also try to keep in mind that I am answering for other people as well who may have a similar interest or curiosity.
Title: Re: How to make a diary, wich the player can type in?
Post by: Jakerpot on Mon 16/03/2009 21:34:59
ohh no, now i saw the module, no that isnt what i want. I want a place where THE PLAYER CAN TYPE NOTES IN THE JOURNAL not me, the player will type sentences to remember something. Undertood????? Thank you!@
Title: Re: How to make a diary, wich the player can type in?
Post by: RickJ on Mon 16/03/2009 22:17:00
Make a gui with a textbox and a list box.   In the the textbox OnActivate event function add a entry to the listbox something like the following.


     listbox.AddItem(textbox.Text);
     textbox.Text = "";
Title: Re: How to make a diary, wich the player can type in?
Post by: Jakerpot on Mon 16/03/2009 23:18:11
but how this will get what player typed??
Title: Re: How to make a diary, wich the player can type in?
Post by: RickJ on Mon 16/03/2009 23:34:18
When player types text is entered into textbox.  When player types <enter> testbox makes OnActivate event occur which makes event function execute, which copies text into listbox, which displays text player typed.
Title: Re: How to make a diary, wich the player can type in?
Post by: Jakerpot on Tue 17/03/2009 00:06:10
its worked   :D thank a lot!
Title: Re: How to make a diary, wich the player can type in?
Post by: Jakerpot on Tue 17/03/2009 00:38:18
and if i want to delete a iten from the list?
Title: Re: How to make a diary, wich the player can type in?
Post by: RickJ on Tue 17/03/2009 02:14:39
maybe there is a listbox.function that does something like that but i am not sure.   ;)
Title: Re: How to make a diary, wich the player can type in?
Post by: Jakerpot on Wed 18/03/2009 00:10:00
just a list.clear, but then it will remove it all! maybe something like:


if (list.SelectedIndex == xx){
//erase??
}

i'm not sure.
Title: Re: How to make a diary, wich the player can type in?
Post by: Gilbert on Wed 18/03/2009 00:50:44
Just check out ListBox.RemoveItem() from the manual.
Title: Re: How to make a diary, wich the player can type in?
Post by: Dualnames on Wed 18/03/2009 10:25:19
Quote from: RickJ on Mon 16/03/2009 11:44:34
@Jim:  Yeah, I know a regular "Sir Postsalot" but if I kindly tell him to just read enough time he may do so one fine day?   I also try to keep in mind that I am answering for other people as well who may have a similar interest or curiosity.

Was that going towards me..I think it was..I don't really mind the way you respond here, I find it quite the best way, so if someoen searches the forums he can find something of usefulness, don't know if I offended you somehow, but if I did sorry it was not my intention, since I actually do like you. :D