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: How to place an inventory item first  (Read 3352 times)

0 Members and 1 Guest are viewing this topic.

anarchist

  • Regular poster
  • ***
  • Karma: 5
  • Offline Offline
  • Gender: Male
  • Posts: 212
    • View Profile
How to place an inventory item first
« on: January 19, 2014, 04:04:09 PM »

Hello everyone,

I think the functionality I want is not supported. I would like to have every new item I take using Game.TakeItem to be inserted first. The only thing that is supported is InsertAfter argument which allows you to define after which item to insert the newly taken item. I have tried sending null and "" (empty string) to it but Game.TakeItem always inserts the new item last.

 Is there a work around? Perhaps I can somehow get the inventory array and handle this myself? Any help would be appreciated.
Logged

Mnemonic

  • WME developer
  • Administrator
  • Addicted to WME forum
  • *
  • Karma: 41
  • Offline Offline
  • Gender: Male
  • Posts: 5683
    • View Profile
    • Dead:Code Site
Re: How to place an inventory item first
« Reply #1 on: January 19, 2014, 04:13:02 PM »

I think you'd need to remember taken items, drop them, then take them again in the required order.
Logged
Yes, I do have a twitter account
Please don't send me technical questions in private messages, use the forum. ::wave

anarchist

  • Regular poster
  • ***
  • Karma: 5
  • Offline Offline
  • Gender: Male
  • Posts: 212
    • View Profile
Re: How to place an inventory item first
« Reply #2 on: January 19, 2014, 04:28:23 PM »

Got it, thanks for the advice Mnemonic.
Logged
 

Page created in 0.035 seconds with 23 queries.