"No Items" global message 996 doesn't appear [SOLVED]

Started by x_traveler_x, Fri 28/01/2005 07:27:08

Previous topic - Next topic

x_traveler_x

 ???  Okay, I feel stupid because I can't figure this out:

As we all know, AGS has a built-in Inventory GUI by default.  When enabled, global message 996 is displayed to indicate that you currently have no items in your inventory. 

Well, after I created a custom GUI, the message no longer appears, but I'd really like for the message to be displayed instead of the GUI until the first item is picked up.

I know I must be overlooking some kind of minor setting or a variable of some kind.  :-\

Thanks
~~- - -. . .finding a cure for mundanity. . . - - -~~

Radiant

In the code that pops up your inventorywindow (GUIOn), add something like this,
Code: ags

if (game.num_inv_carried == 0) Display ("You don't have anything!");
else GUIOn (INVENTORY);


(not sure if I spelled that var correctly, so check the manual)

Ishmael

Direct copypaste from the Manual (Text Script Global Variables reference) (with the addition of the bold tags):

game.num_inv_itemsÃ,  Number of different inventory items which the current player is carrying.

This one, I reckon, is the one you were looking for.
I used to make games but then I took an IRC in the knee.

<Calin> Ishmael looks awesome all the time
\( Ö)/ ¬(Ö ) | Ja minähän en keskellä kirkasta päivää lähden minnekään juoksentelemaan ilman housuja.

x_traveler_x

Yes, that's it!

Thanks for pointing it out to me, I don't know how I missed it.
~~- - -. . .finding a cure for mundanity. . . - - -~~

SMF spam blocked by CleanTalk