Wintermute Engine Forum
Wintermute Engine => Technical forum => Topic started by: TheDerman 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.
-
No, unfortunately it's not possible at the moment.
-
OK, thanks.
Might it be possible sometime soon? ;D I think it's a useful thing to be able to do.
-
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
-
^
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.
-
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