Setting Up The Inventory Window Space

Started by IdleHands, Mon 26/05/2008 01:09:11

Previous topic - Next topic

IdleHands

Hello once again.

Yes two topics in a day, oh how you may come to hate me. I didn't want to add this to the other thread as this is a different kettle of fish. Once again I have scoured the internet and forum for help but to no avail (well actually avail to previous problems but just not this one).

My problem is thus; I've created a custom Inventory screen on a blank template game, and I've got it to appear, disappear, and the buttons to work. The only problem is how do I set up the Inventory window for the GUI, i.e. the space inventory items will appear in the GUI. I've found info like invMain.ItemWidth and invMain.ItemHeight, but they define the inventory items x and y but not the space they appear within (or where to place such script within the global script).

I hope that is understandable. Sorry if I've missed an obvious solution (it seems silly I can do everything else but fail at the most important and basic part, doh!), it would be due to me not knowing the technical words to such for thus missing it (I've tried searching everything I can think of).

Any help would be appreciated  :)

skuttleman

There's a GUI control type called and Inventory Window. You'll need to add one of those to your GUI.

Have you read through the tutorial? Not skimmed it or searched, but actually read through it? That's really the best way. You'll find all sorts of functions and tidbits that will make just about everything you try to do easier.

IdleHands

Yes I've read through the tutorial, still wrapping my head around the pointers section though.

The only GUI control I can find is "GUIControl.AsInvWindow", but the manual only says;
"InvWindow* GUIControl.AsInvWindow;"
Which frankly baffles me.

You'll have to forgive me, and fully explain it to me in laymans. When I look at some threads / help sections they say put in this script but never say where it's to be put (just a vague "somewhere in the global script"). Yeah, as you can tell I'm a very basic script user (once I understand it then it's all good, otherwise it's all very confusing).

skuttleman

Open the inventory GUI you've made by finding it in the project tree and double clicking it (or single clicking it if you're not using AGS version 3)

Across the top of the screen (above the gui you're editing) you'll see different buttons that allow you to create different control types on the gui. In version 3, they look like this (they don't look that much different in earlier versions of AGS):



The right most of these buttons will allow you to create an Inventory Window control. Place one on your GUI, and when you run the game, the GUI should show you the player's inventory. If this doesn't help you, then I'm sorry because I can't make it any simpler.

IdleHands

Ok now I feel very foolish for somehow missing that.

Thanks for the help and dealing with a complete fool (that's me). :P

SMF spam blocked by CleanTalk