I need for my game, alot of close up screens of objects for when you look at them. Also I need those screens where you can read a diary book fullscreen, and you can browse through the pages back and forth.
I need the best way in doing this. If I need to use a new room for every page and closeup, that'll take 100 rooms. So I figured you should do something maybe with a GUI in one specific room for it, but I have the faintest idea of how to accieve this.
Could someone please explain to me how this works? Dave Gilbert for instance, used it in his game...
Thanks in advance!
As for the book GUI:
Create a GUI containing: 1. a label, 2. a previos button, 3. a next button, 4. an exit button
This is the GUI script:
if (interface == BOOK) { // They clicked a button on the book
if (button == 1) {
GUIOff(NOTE); // exit button
}
else if (button == 2) { // next
SetGlobalInt(498, GetGlobalInt(498)+1);
book_pages(); // see below
}
else if (button == 3) { // previous
SetGlobalInt(498, GetGlobalInt(498)-1);
if (GetGlobalInt(498)<0) SetGlobalInt(498, 0);
book_pages();
}
} // end if interface BOOK
GI 498 is the page number
the book_pages() function should be placed in the global script an is something like this:
function book_pages() {
if (GetGlobalInt(498)==0) SetLabelText(BOOK, 0, "this is page 1");
else if (GetGlobalInt(498)==1) SetLabelText(BOOK, 0, "this is page 2");
else if (GetGlobalInt(498)==2) SetLabelText(BOOK, 0, "this is page 3"); // etc
}
QuoteI need for my game, alot of close up screens of objects for when you look at them.
I think using a room for each object could be a good idea, actually. Just use the room number above 300. Their state are not remembered into the savedfile but that's not needed in that case. This is especially useful if you want the objects to interact with. You can draw a hotspot area specific for a single object (room).
If you wanted to use a different approach, you could make each note one 'frame' of the animating background. Set a globalint to tell which note or page to read, then use SetBackgroundFrame to change to the correct frame.
I remember AGDI had problems with beta testers reading a note while in a timed area, or an inescapable area, and popping out of the situation they were in. Personally, I would set up a save game in slot 100 (can't be seen by the user) and load that game when leaving the 'note' room, so that EVERYTHING is the same as when the player 'left.' I don't think it would be too hard to do.
You could make a GUI with the diary, use a label for the text and use buttons with which to turn tha pages, a globalint and SetLabelText to change the text.