Wintermute Engine Forum

Wintermute Engine => Technical forum => Topic started by: Catacomber on November 02, 2008, 05:30:30 AM

Title: Skewed inventory objects and hourglass
Post by: Catacomber on November 02, 2008, 05:30:30 AM
Following Chapter 8 of the WME book online -- Our Own First Game --have learned some useful things but I have two small questions:

In the Street Scene, my inventory objects are too high up and a little too far to the left--they're not centered on the boxes.

(http://i156.photobucket.com/albums/t17/catacomber/Invpic.png)

I get an hourglass during the first scene where Molly has the long dialogue with her Alternate:

(http://i156.photobucket.com/albums/t17/catacomber/Hourglass.png)

I have no script errors and other than this, everything flows as it should.

Any suggestions?

Nihil's artwork is really nice.

On that first introductory scene it would be good to hide the inventory--how and where would you do that? I would guess in the scene but where?

Děkuji za vaši pomoc.



Title: Re: Skewed inventory objects and hourglass
Post by: metamorphium on November 02, 2008, 09:44:12 AM
Není zač. :)

Cat,

to position items in inventory, you should open the data\interface\inventory.def file. It's now super easy because of the window editor tool (you can simply double click the file).

Here you see on the left side a component tree, so choose "Inventory box" and simply move it to the desired location and save.

Hourglass is the default "wait" cursor for the non-interactive state. You can either call Game.RemoveWaitCursor(); or change the Nonint. cursor property in the Project Manager (see the chapter 1).

Hope this helps. :)

Edit: Hiding inventory is done through Game.InventoryVisible = false; But the code which handles that is in data\scripts\game_loop.script (game_daemon.script). Simply set some global variable let's say InventoryHidden to true (in the places you don't want to display the inventory) and modify this line

Code: WME Script
  1. if(Game.Interactive && Game.MouseY < 45 && !InventoryHidden) Game.InventoryVisible = true;
  2.  

As it's very global function, I'd put into base.inc

Code: WME Script
  1. global InventoryHidden;
  2.  

and finally in your scene_init.script of the molly scene you'd put

Code: WME Script
  1. InventoryHidden = true;
  2.  

and

in the scene_init.script of the outside scene you'd set this value to false.
Title: Re: Skewed inventory objects and hourglass
Post by: Catacomber on November 02, 2008, 04:02:26 PM
Wow! That was a big wonderful lesson.  Děkuji za tvoji pomoc.    :)  Thanks again. : )
Title: Re: Skewed inventory objects and hourglass
Post by: Catacomber on November 25, 2008, 05:46:08 AM
I finally got my inventory box perfectly positioned to receive items by manipulating the inv def file.  : ) ) )  ^^ 

(http://i156.photobucket.com/albums/t17/catacomber/Invshot.jpg)