Falkner1992 Posted June 22, 2012 Share Posted June 22, 2012 The title pretty much says it all. I know giving access to your companion's inventory requires some heavy duty scripting, but I have no idea what it is. Could you please help me? Link to comment Share on other sites More sharing options...
Falkner1992 Posted June 22, 2012 Author Share Posted June 22, 2012 ... make it so he doesn't attack you if you accidently hit him? EDIT: Sorry, I didn't see that only half the title was visible. :P Link to comment Share on other sites More sharing options...
lonewolfkai Posted June 22, 2012 Share Posted June 22, 2012 What type of companion are you talking about? The ones that follow you around in vanilla or a mod added companion, such as CM Partners? Link to comment Share on other sites More sharing options...
Falkner1992 Posted June 22, 2012 Author Share Posted June 22, 2012 Custom-content companions, kinda like Ruined Tale or the Butcher of Armindale. Link to comment Share on other sites More sharing options...
evenstargw Posted June 22, 2012 Share Posted June 22, 2012 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 More sharing options...
Falkner1992 Posted June 22, 2012 Author Share Posted June 22, 2012 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. Link to comment Share on other sites More sharing options...
WarRatsG Posted June 22, 2012 Share Posted June 22, 2012 (edited) 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 June 22, 2012 by WarRatsG Link to comment Share on other sites More sharing options...
Recommended Posts