Aller au contenu

Photo

Openinventory script


  • Veuillez vous connecter pour répondre
5 réponses à ce sujet

#1
PJ156

PJ156
  • Members
  • 2 988 messages
I want the player to be able to use the inventory on an object (a wagon). When the wagon is clicked then from a convo I want to be able to rest in the wagon or store things in the wagon.

What I cannot do is get the inventory of the wagon to open out of the convo. I am using the open inventory script in the toolset.

To open an inventory, hell any inventory will do, I have tried:

1. Calling the tag of the wagon.
2. Calling the tag of an ipoint with its own inventory.
3. Calling the tag of a rat hidden under the wagon (since the script calls oCreature).

In desperation I instead of using gp_talk_object I made a script to start the convo with the rat in case the owner of the inventory needs to be in the conversation.

None of these have worked, I am either doing comething wrong or that script does not do what I want it to.

(btw the rat option does not work because the bloody thing keeps running out form under the wagon when you start the convo).

Any thoughts would be welcome.

PJ

#2
Lugaid of the Red Stripes

Lugaid of the Red Stripes
  • Members
  • 955 messages
Invisible man? (Wagon ninja!)

Does the open inventory function actually work? I thought it was just a vestige from the NWN SOU henchman system. There's a DoPlaceableObjectAction function, that might work. (You could always set the wagon to be non-useable before and after the convo if you want to keep it locked up).

#3
_Knightmare_

_Knightmare_
  • Members
  • 643 messages
Here's a couple lines from one of my scripts that opens a chest inventory:

DelayCommand(1.0, AssignCommand(oPC, ActionInteractObject(oChest)));
DelayCommand(1.05, DisplayGuiScreen(oPC, "SCREEN_CONTAINER_DEFAULT", TRUE, "container.XML", TRUE));

#4
Lugaid of the Red Stripes

Lugaid of the Red Stripes
  • Members
  • 955 messages
How do you open up the inventory of an NPC?

#5
_Knightmare_

_Knightmare_
  • Members
  • 643 messages

Lugaid of the Red Stripes wrote...

How do you open up the inventory of an NPC?


Don't think you can. I can think of ways to fake it I guess, but it would just be a listing of inventory (like a chest) and not actually open the NPC's inventory like the PC inventory is.

#6
PJ156

PJ156
  • Members
  • 2 988 messages

_Knightmare_ wrote...

Here's a couple lines from one of my scripts that opens a chest inventory:

DelayCommand(1.0, AssignCommand(oPC, ActionInteractObject(oChest)));
DelayCommand(1.05, DisplayGuiScreen(oPC, "SCREEN_CONTAINER_DEFAULT", TRUE, "container.XML", TRUE));


Thank you _KM_ I will look into his further. Otherwise invisible man it it :)

PJ