Please login or register.

Login with username, password and session length
Advanced search  

News:

Latest WME version: WME 1.9.1 (January 1st, 2010) - download

Author Topic: Items on inventory  (Read 2155 times)

0 Members and 1 Guest are viewing this topic.

Javi-Wan Kenobi

  • Supporter
  • Lurker
  • *
  • Karma: 0
  • Offline Offline
  • Posts: 34
    • View Profile
Items on inventory
« on: April 09, 2007, 10:56:36 AM »

Hi
I want some of the inventory items to have a different response to the "LeftClick" event that others.
In example, while the default action will be select the item so you can use it on other items in the inventory or on objects in the screen, say
Quote
on "LeftClick"
...
// clicking an inventory item
    if(ActObj.Type=="item" && Game.SelectedItem==null)
    {
      Game.SelectedItem = ActObj;
    }
...
some of the items must be used directly in the inventory, without select them, and the response mus be something like that
Quote
on "LeftClick"
{
  global win = Game.LoadWindow("database\index.window");
  win.Center();
  win.GoExclusive();
}
I'm trying to put these lines on a script file for every item who need a different treatment, but always happens the default treatment, which is in the "game.script" file.
Logged

Javi-Wan Kenobi

  • Supporter
  • Lurker
  • *
  • Karma: 0
  • Offline Offline
  • Posts: 34
    • View Profile
Re: Items on inventory
« Reply #1 on: April 09, 2007, 11:03:57 AM »

Well, i've just found the way.
Thanks anyway
Logged
 

Page created in 0.063 seconds with 24 queries.