Wintermute Engine Forum
Wintermute Engine => Technical forum => Topic started by: SANNOI on February 06, 2003, 02:05:25 AM
-
Hi!
I've already programmed the interface of my game but I've got a problem. I'm trying to put an inventory icon on the screen (like Sam'n'Max), then I've created a global entity which is my icon. In the scenes without scroll, this entity is seen without problem but in the scenes with scroll it's fixed in a point (it doesn't move with the scroll)
I put this code in the main loop of the game daemon script.
global invIcon = Game.LoadEntity("interface\system\inv\inv.entity");
while(true){
invIcon.SkipTo(60,40);
invIcon.Active=true;
[...]
}
Can anybody(Mnemonic) help me?
Thanks
SANNOI
-
I don't think the entity is the right solution here, because the entities are part of the scene. A "window" would be much more suitable for this. Just create a transparent window, covering the whole screen, and the window will containt one button (-> your inventory icon).
Something like this:
WINDOW
{
X = 0
Y = 0
WIDTH = 800
HEIGHT = 600
TRANSPARENT = TRUE
BUTTON
{
NAME = "Inventory"
X = 20
Y = 20
IMAGE = "inventory_icon.bmp"
SCRIPT = "blah.script"
}
}
You will then load the window in game.script using
var WinInventoryIcon = Game.LoadWindow("blahblah.window");