Hullo. I would like to know how you stop items overlapping in your inventory. At the moment, when the player receives his second item, the two icons appear on top of each other and it makes it difficult to use the one on the bottom. (And it also doesn't look very nice).
Do I need to add a function giving the x and y co-ordinates?
Thank you for taking the time to read my query.
What you're looking for are the InvWindow.ItemWidth and InvWindow.ItemHeight properties. That will allow you to specify the size your InventoryItems should take up. If you want to have them displayed outside of a rectangular-based grid you'd have to write your own custom script to handle it.
Thank you for the help.
Now that you have pointed me in the right direction, could I be awkward and ask how I would use those properties? Which script file do I place them in and how would I begin? Sorry for not getting it the first time; at the moment I'm using the excuse of not being too familiar with AGS.
If you open the GlobalScript.asc file and then go to the function game_start you could put something along the lines of:
invWindow.ItemWidth = 38;
invWindow.ItemHeight = 24;
Which would set each item in the InvWindow named invWindow to take up a rectangular box of 38x24 pixels. ;)
Yay!
After seeing your example, I figured out why it wasn't suggesting invWindow in the short-cut box and therefore confusing me.
I had my inventory window called invCustomWindow, by default.
Now I have corrected it and you have made my game that little bit better.
Thank you for helping,
Francis de Mont
You shouldn't have to script it in game_start, I believe those are listed in the properties pane when you have the inventory window selected in the GUI editor.
~Trent
Touché. ;)
But anyway I am glad you got it sorted out.