Please login or register.

Login with username, password and session length
Advanced search  

News:

IRC channel - server: waelisch.de  channel: #wme (read more)

Author Topic: Get all items  (Read 4613 times)

0 Members and 1 Guest are viewing this topic.

TheDerman

  • Regular poster
  • ***
  • Karma: 0
  • Offline Offline
  • Posts: 225
    • View Profile
Get all items
« on: February 14, 2006, 12:44:30 PM »

Morning everyone,

Is there a quick way for me to add ALL the inventory items I have to the inventory with one piece of simple code?

Something like Game.TakeAllItems; or Game.TakeItem(all);    ???

I'd like to check them all out to see how they look, plus make sure scrolling works etc., but I don't want to have to add every item manually as that would take ages, and I'd have to go back and add each new one time and time again.

Thanks.
Logged

Mnemonic

  • WME developer
  • Administrator
  • Addicted to WME forum
  • *
  • Karma: 41
  • Offline Offline
  • Gender: Male
  • Posts: 5683
    • View Profile
    • Dead:Code Site
Re: Get all items
« Reply #1 on: February 14, 2006, 01:10:55 PM »

No, unfortunately it's not possible at the moment.
Logged
Yes, I do have a twitter account
Please don't send me technical questions in private messages, use the forum. ::wave

TheDerman

  • Regular poster
  • ***
  • Karma: 0
  • Offline Offline
  • Posts: 225
    • View Profile
Re: Get all items
« Reply #2 on: February 14, 2006, 02:34:59 PM »

OK, thanks.

Might it be possible sometime soon?  ;D  I think it's a useful thing to be able to do.
Logged

SBOVIS

  • Frequent poster
  • ****
  • Karma: 0
  • Offline Offline
  • Gender: Male
  • Posts: 404
  • FORGET REALITY SURRENDER TO YOUR DARKEST DREAMS
    • View Profile
    • LIMBO of the LOST
Re: Get all items
« Reply #3 on: February 14, 2006, 04:20:54 PM »

Hi,
     The best way to do this is list them in your GAME.script
Eg.

Game.TakeItem("Key");
etc
etc
etc


Then just mask them out using //

eg.
//Game.TakeItem("Key");

This way when you create new items add them to the Game.Script and mask them out, unmask them when you wish to show them in the INVENTORY . Easy way of debugging puzzles using items and checking out the way they look and how the inventory works.

Then when your happy you can delete the lines before compiling.


Hope this helps. It works for me............hahahahaha


Logged
kind Regards
Steve Bovis
MAJESTIC STUDIOS

organican

  • Occasional poster
  • **
  • Karma: 0
  • Offline Offline
  • Posts: 74
    • View Profile
Re: Get all items
« Reply #4 on: February 20, 2006, 11:49:38 AM »

^

But wouldn't it be even better to have them in a separate script that you attach to the game.script or scene_init.script?

Then you just have to unmask one line of code.

You either say this:

//#include "scripts\takeall.scripts"

or this:

//this.AttachScript("scripts\takeall.script");

...in a script somewhere.


Something like that.

And then you just mask/unmask it whenever you like.
« Last Edit: February 20, 2006, 11:54:24 AM by organican »
Logged

varnama

  • Lurker
  • *
  • Karma: 0
  • Offline Offline
  • Posts: 44
    • View Profile
Re: Get all items
« Reply #5 on: February 20, 2006, 04:23:31 PM »

Sorry but Mnemonic advanced to you  ;), and add a option in todo list:
 -make all defined inventory items queriable

I think Mnemonic would have change his signature for this "always making the life easiest;D
Logged
 

Page created in 0.039 seconds with 20 queries.