Please login or register.

Login with username, password and session length
Advanced search  

News:

For WME related articles and tutorials visit WME Resource Center.

Author Topic: Quick intentory question...  (Read 2631 times)

0 Members and 1 Guest are viewing this topic.

piere

  • Supporter
  • Frequent poster
  • *
  • Karma: 4
  • Offline Offline
  • Posts: 301
  • Sorry for any bad english in my posts. Game on !
    • View Profile
Quick intentory question...
« on: February 11, 2012, 02:56:01 AM »

How would I change what inventory items in the list appears first? For example, say I have a few book items in the inventory and a cell phone in there as well, but it is displayed all the way to the right. How would I change the position on the cell phone to appear first in the inventory? Thanks all
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: Quick intentory question...
« Reply #1 on: February 11, 2012, 09:09:21 PM »

not explicitly. You can however add that item as the first item in the game, or you can modify the inventory window to have this as a omnipresent button (outside the inventory logic).

Or you can do a cheat - in Game.FadeOut() drop and retake all items starting with the phone. :)
Logged
J.U.L.I.A. Enhanced Edition, Vampires!, J.U.L.I.A., J.U.L.I.A. Untold, Ghost in the Sheet

piere

  • Supporter
  • Frequent poster
  • *
  • Karma: 4
  • Offline Offline
  • Posts: 301
  • Sorry for any bad english in my posts. Game on !
    • View Profile
Re: Quick intentory question...
« Reply #2 on: February 11, 2012, 10:13:41 PM »

Hey metamorphium,

How would I add that item as the first in the game, or how would I modify it to have it as a omnipresent button? Thanks
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: Quick intentory question...
« Reply #3 on: February 11, 2012, 11:30:33 PM »

omnipresent button would have been done by modifying the window in the window edit
(inventory.def)

and adding a button outside of the Inventory box object (you can position it whenever you want).

If you want to have it as a regular inventory item, you can either:

1. design your game so the cell phone is the very first item player can pick up
or
2. start the game with the item already picked up (eg. calling Game.TakeItem("cellPhone"); before player does any action).
Logged
J.U.L.I.A. Enhanced Edition, Vampires!, J.U.L.I.A., J.U.L.I.A. Untold, Ghost in the Sheet

piere

  • Supporter
  • Frequent poster
  • *
  • Karma: 4
  • Offline Offline
  • Posts: 301
  • Sorry for any bad english in my posts. Game on !
    • View Profile
Re: Quick intentory question...
« Reply #4 on: February 12, 2012, 01:44:26 AM »

Thanks but I am still a little confused. If I have an omnipresent button, what exactly will it do? I would want the player to be able to "organize" their inventory when they want, so having the cell phone as the first item may not work. Any other ideas?
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: Quick intentory question...
« Reply #5 on: February 12, 2012, 02:17:41 AM »

the idea was that the cell phone will not be the part of the inventory logic. It would have separate on "CellPhone" handler
Logged
J.U.L.I.A. Enhanced Edition, Vampires!, J.U.L.I.A., J.U.L.I.A. Untold, Ghost in the Sheet

Jose

  • Regular poster
  • ***
  • Karma: 2
  • Offline Offline
  • Posts: 134
    • View Profile
Re: Quick intentory question...
« Reply #6 on: February 13, 2012, 07:16:30 PM »

Hi Piagent, I've never tried but maybe you can use the InsertAfter parameter of the TakeItem method so you can order the inventory items as you want.
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: Quick intentory question...
« Reply #7 on: February 13, 2012, 09:35:33 PM »

the problem with InsertAfter is that you'd need to know the name (not the index) of the item in question. But if you want to insert it as the very first item, it (IMO) wouldn't work.
Logged
J.U.L.I.A. Enhanced Edition, Vampires!, J.U.L.I.A., J.U.L.I.A. Untold, Ghost in the Sheet

Prote1n

  • Lurker
  • *
  • Karma: 0
  • Offline Offline
  • Posts: 45
    • View Profile
Re: Quick intentory question...
« Reply #8 on: February 14, 2012, 02:25:32 PM »

Could it be possible to rearrange the items.items file and reload it with Game.LoadItems ?

Does the Inventory Window will be updated in real time ?
Logged
 

Page created in 0.132 seconds with 23 queries.