Jump to content

Two questions: How to access your companion's inventory and make i


Falkner1992

Recommended Posts

Easiest way of finding out is to open up such a mod and have a peek at the scripts. Usually they have at least some comments in the scripts to describe what each part is for. It may also give you some ideas about other stuff you hadn't thought of yet.
Link to comment
Share on other sites

I'm sorry, perhaps I have been misinterpreted. I meant what do I need to do in the CS so make it so the player can access my custom-content companion's inventory.

You need to create a script in the CS.

 

Unfortunately, Oblivion's mechanics don't allow someone to directly access someone's inventory (while alive) other than pickpocketing. Therefore, modders made something that just looked like what we wanted, using script.

 

All items that the companion had are duplicated and put into an invisible container. Then that container is moved to the player and the script makes the player activate the container. This makes it look like you are searching the companion, while you are in fact searching a completely separate container.

 

That's just a summary - I'm unsure exactly what happens, but as everyone else has said, take a look at someone else's scripts. They will give you specifics.

 

 

To stop them attacking you, I guess you could merge this script fragment into the companion's script...

 

If (GetCombatTarget == Player)
    StopCombat Player
endif

Edited by WarRatsG
Link to comment
Share on other sites

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...