Please login or register.

Login with username, password and session length
Advanced search  

News:

For WME related articles and tutorials visit WME Resource Center.

Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.

Messages - mowren

Pages: [1]
1
Fixed / Checking if there are no items in inventory
« on: July 30, 2008, 08:37:27 AM »
Is there a way to check if Game.NumItems oder Game.TotalNumItems is 0/null or undefined or if the inventory is empty?
The situation is that my character doesn't have any items in his inventory and so the inventory shouldn't be available until he takes his first item (and later it I intend to make it unavailable again if all items are used or droped).

Everytime I try something like this and the condition becomes true (in other words, if there are no items in the inventory), Wintermute closes with a crash log which talks about EXCEPTION_ACCESS_VIOLATION.

Code: [Select]
var z = Game.NumItems;
if(z == 0)
{
//Do Something
}

2
Well, I still need some help. I'm already struggeling with displaying an intentory icon outsite of an InventoryBox.
I created a new window and tried to create new entities for the inventory items by script and place them in nested windows or entity containers. But those entities are just images and don't behave like icons in an InventoryBox.
I'm just able to define things like MouseEntry, LeftClick, etc. but can't get it to reference a specific item in the inventory array.


3
So basicly your'e saying I should start with creating a new gui window instead of using the build-in inventory support?

But how would I place an item from an associative array in the corresponding nested window or entity container? I guess every item is displayed as an entity object which can be created by script, right?


4
Technical forum / Changing the order inventory items are displayed
« on: July 20, 2008, 10:21:52 AM »
I've looked around in this forum for quite some time now but didn't find an satisfying answer to my question yet. If there's a matching thread already please link me to it.

But on to my concern.
I'd like to know if it's possible to change the order an InventoryBox is filled with items when displayed. As far as I see it, the default method to display inventory items in the box starts in the top left corner and fills the columns from left to right until the row is filled. Then a new row starts under the filled one.

This works just fine but for my game I'd like the InventoryBox to start at the bottom right corner. After that the following items should be placed in the row over the previous item until the column is filled. Then a new column should be startet next to the filled one (building the grid from right to left).

Therefore I'd like to know if this is possibile with Wintermute.
And if so, where should I start to achieve it?

For your ease I visualized my idea. The numbers show the order of the inventory items being displayed.

Pages: [1]

Page created in 0.118 seconds with 39 queries.