How Do I make it so a NPC IS your inventory... Like when you click on it it brings up your inventory and it is the only way to access it For example the luggage in discworld... I want to make the NPC BE the inventory for my character... and no other way to access it... The NPC follows you around all the time....
Basically like discworld.
Well, buloght made a module and demo game something like this for a coding competion (http://www.adventuregamestudio.co.uk/yabb/index.php?topic=24068.msg299948#msg299948).
Alternatively, if you don't want anything quite that fancy (it's a dual inventory thing), just script it so interacting with the character turns the Inventory on, and nothing else does - it's not actually that hard.
You'll need to remove code from the Inventory button on the ICONBAR GUI (if you're using it) - and possibly the button itself (btnIconInv) - and from on_key_press in the global script - to disable the Tab key (keycode 9). Looking at them should also tell you what you'll need to add to the character's interaction to turn the Inventory on.
Ok I disabled the Iconbar GUI and the like and Now I just need to find out how to script clicking on the NPC makes the Inventory Window coming up...
Well I have an idea that it might be some function used with this: show_inventory_window();
But what function would that be?
BFAQ Entry: Placing your code: The basics. (http://americangirlscouts.org/agswiki/index.php/Scripting%2C_Code_%26_Interaction#Placing_your_code:_more_basics)
Basically, it depends on how exactly you want to open the inventory. If any click on the NPC will do it, it goes in the character's 'Any click on character' interaction. If you want it to be a specific cursor mode, it goes in that mode's interaction (e.g. 'Interact with character', 'Look at character').
It might be worth your time tracking down a few basic tutorials (like the one in the manual, or this one on scripting (http://www.adventuregamestudio.co.uk/actutor.htm) from the Tutorials page (http://www.adventuregamestudio.co.uk/acres.shtml)), and taking a look through some old posts here on the forums before you go any further - save you asking a question that's already been answered.
Hmm I put into show_inventory_window(); into interact with NPC and the game saves and loads up but the Inventory window won't pop up
No error messages, though? That's reassuring...
Nothing happens when? Are you using the right mode? (Note: clicking with the 'Walk to' cursor won't work, even if it's in 'Any click'.) Is the NPC set to 'Clickable'? (It should be by default, but worth checking.) Post your code for the character interaction, including the top comment line (in green).