custom inventory pretends it doesn't exist when one tests the game

Started by Kingzjester, Fri 27/02/2004 03:12:37

Previous topic - Next topic

Kingzjester

A curious thing: I have merely inserted a background image, resized the sucker (i.e. the whole pop-up window) and changed the two colors that I could into 0 (since there are some spaces that I want to be see-through). All looks great until I test run the game, and turn on the inventory, it shows a thing that is not even the old inventory, but something even more generic...

Oh, and since this is my first post, I have to say that the registration quiz is the most tedious screening thing I have ever had to go through. Is it not enough that I have spent an hour imploring the inventory to work, but now I come here and the forum quizzes me like it's the freakin' border patrol! Suffice it to say that I am tempted to curse gratuitously, but I will not, since that quiz thing makes the administrators look like wee totalitarians who tolerate no outbursts of 'bad behavior'. I will not curse, no, at least not in this little window....

So, yeah, to recapitulate: the inventory I see ain't my baby...

Gilbert

Because by default a new game is using the internal inventory window which is NOT the GUI one, you have to edit the scripts a bit to enable the customizable GUI one.

Choose scripts --> Edit Global Script...

Look for the following portion of code:

function show_inventory_window () {
 // This demonstrates both types of inventory window - the first part is how to
 // show the built-in inventory window, the second part uses the custom one.
 // Un-comment one section or the other below.
 
 // ** DEFAULT INVENTORY WINDOW
 InventoryScreen(); <-- comment out this
/*  <-- remove this
 // ** CUSTOM INVENTORY WINDOW
 GUIOn (INVENTORY);  
 // switch to the Use cursor (to select items with)
 SetCursorMode (MODE_USE);
 // But, override the appearance to look like the arrow
 SetMouseCursor (6);
*/ <-- remove this
}

Just do as instructed in red
It should become something like:

function show_inventory_window () {
 // This demonstrates both types of inventory window - the first part is how to
 // show the built-in inventory window, the second part uses the custom one.
 // Un-comment one section or the other below.
 
 // ** DEFAULT INVENTORY WINDOW
//  InventoryScreen();

 // ** CUSTOM INVENTORY WINDOW
 GUIOn (INVENTORY);  
 // switch to the Use cursor (to select items with)
 SetCursorMode (MODE_USE);
 // But, override the appearance to look like the arrow
 SetMouseCursor (6);

}

Save the script and recompile, enjoy.

Kingzjester

Fancy that! All of a sudden that quiz I took became far less annoying...

Kingzjester

I completely managed to miss the commented out stuff within the global scripts page... Now I feel stupid. It is all your fault! Or something...

Scummbuddy

We appreciate your input on the quiz... although I don' t think we'll be changing it anytime soon.  

We've had our run with some serious trouble makers on our boards. We feel that our boards are some of the most friendly and helpful and talkative boards out there, and we try to not let things get out of hand.

The quiz does have some questions that may seem rediculous, or first grade level, but you'd be surprised at what kind of lunacy can run rampant here.  

Besides, you could have posted in the beginners forum as a guest without having to register, but we're glad you did, and we hope your stay here is long and fun.
Bring out the paddles.. you've got to run the gauntlet.... then do jello-shots... or something.  ;)
- 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

Kingzjester

Quote from: Scummbuddy on Sun 29/02/2004 03:23:55Besides, you could have posted in the beginners forum as a guest without having to register, but we're glad you did, and we hope your stay here is long and fun.
Bring out the paddles.. you've got to run the gauntlet.... then do jello-shots... or something.  ;)
Well... Damn... Didn't notice you could do that... What is with me and not noticing? Well, anyway, I have made a great GUI and am going to make the greatest AGS game yet, mark my words.

You may wonder, if he created the GUI first, what chances are there that he is going to pay enough attention to the facets of the game that really matter? Well, at least I didn't create the website first and then somehow forgotten about the game... You see, I needed to streamline a lot of the GUI for greater immersion and ease of use, but more importantly I hate most Sierra adventures, so looking at those controls was just painful...

SMF spam blocked by CleanTalk