Please login or register.

Login with username, password and session length
Advanced search  

News:

This forum provides RSS feed. To query recent posts use this url. More...


Author Topic: inventory  (Read 4764 times)

0 Members and 1 Guest are viewing this topic.

tinchopunk

  • Occasional poster
  • **
  • Karma: 0
  • Offline Offline
  • Gender: Male
  • Posts: 90
    • View Profile
    • martinarregui.tumblr.com
inventory
« on: October 24, 2005, 04:41:44 PM »

i want to make an inventory like in the game shelock holmes 2 that you right click of the mouse and apear the inventory and a book that you can go to a map, see past dialogos, etc. How can i do that??? and of course you right click again and diseapear...
thanks
 Martin
Logged

Mnemonic

  • WME developer
  • Administrator
  • Addicted to WME forum
  • *
  • Karma: 41
  • Offline Offline
  • Gender: Male
  • Posts: 5683
    • View Profile
    • Dead:Code Site
Re: inventory
« Reply #1 on: October 25, 2005, 07:00:36 AM »

I haven't played the game, but from what you described, it could be easily done using a GUI window in WME. Or am I missing something? Remember, the inventory in WME is just a window, and you can add as many controls to it as you want. The tricky part would be the past dialogues. WME doesn't keep track of them, you'd have to script it somehow, such as overriding the default Talk() and GetResponse() methods and store each spoken line and player's response somewhere.
Logged
Yes, I do have a twitter account
Please don't send me technical questions in private messages, use the forum. ::wave

tinchopunk

  • Occasional poster
  • **
  • Karma: 0
  • Offline Offline
  • Gender: Male
  • Posts: 90
    • View Profile
    • martinarregui.tumblr.com
Re: inventory
« Reply #2 on: October 25, 2005, 02:43:58 PM »

ok. Thanks well the past dialogues can be change cose they are not necesary... another question, how can i do that wen i right click press the windows appear but with a scroll going from the boton and stop. And the same but inverse wen you right click again...
thanks
 MArtin
Logged

metamorphium

  • Global Moderator
  • Addicted to WME forum
  • *
  • Karma: 12
  • Offline Offline
  • Gender: Male
  • Posts: 1511
  • Vampires!
    • View Profile
    • CBE  software s.r.o.
Re: inventory
« Reply #3 on: October 25, 2005, 08:09:35 PM »

ok. Thanks well the past dialogues can be change cose they are not necesary... another question, how can i do that wen i right click press the windows appear but with a scroll going from the boton and stop. And the same but inverse wen you right click again...
thanks
 MArtin

You want the window with inventory scrolling in from the bottom of the screen after right click?
Logged
J.U.L.I.A. Enhanced Edition, Vampires!, J.U.L.I.A., J.U.L.I.A. Untold, Ghost in the Sheet

tinchopunk

  • Occasional poster
  • **
  • Karma: 0
  • Offline Offline
  • Gender: Male
  • Posts: 90
    • View Profile
    • martinarregui.tumblr.com
Re: inventory
« Reply #4 on: October 26, 2005, 03:54:35 AM »

yes u click and apear, another click disapear. But with scroling, moving up and down to totality of the inventory
Logged

Mnemonic

  • WME developer
  • Administrator
  • Addicted to WME forum
  • *
  • Karma: 41
  • Offline Offline
  • Gender: Male
  • Posts: 5683
    • View Profile
    • Dead:Code Site
Re: inventory
« Reply #5 on: October 26, 2005, 05:04:57 PM »

It's easy, really ;)
All you need to do is to increment/decrement the X or Y coordinate of the window in a loop.
For example, to slide the window from the right edge of the screen, you'd do something like this (untested):

for(var i=Game.ScreenWidth; i>0; i=i-10)
{
  SomeWindow.X = i;
  Sleep(100);
}

If you want to use it for the inventory, just fill SomeWindow variable with Game.GetInventoryWindow()

var SomeWindow = Game.GetInventoryWindow();

And of course, handling the right click is just a matter of adding an on "RightClick" handler to game.script.

By the way, the WME 3D Demo project already contains a sliding inventory window, but it's not triggered by right-click but by moving the mouse pointer to the top edge of the screen.
Logged
Yes, I do have a twitter account
Please don't send me technical questions in private messages, use the forum. ::wave

tinchopunk

  • Occasional poster
  • **
  • Karma: 0
  • Offline Offline
  • Gender: Male
  • Posts: 90
    • View Profile
    • martinarregui.tumblr.com
Re: inventory
« Reply #6 on: October 26, 2005, 11:06:23 PM »

thanks!!!
Logged
 

Page created in 0.021 seconds with 20 queries.