Agnot2006 Posted February 1, 2011 Share Posted February 1, 2011 (edited) I have a small script gleaned from the forums: Scn sashaSummonSCRIPT Ref HatSave Short DidSave Begin OnEquip if player.GetEquippedObject 10, is wearing a hat Set HatSave to player.GetEquippedObject 10, save what Im wearing Set DidSave to 1 endif SashaREF.moveto player If DidSave >0 EquipItem.HatSave ,Re-equip the hat I was wearing Endif ElseIf DidSave == 0 UnequipItem PartyHatREF , remove the party hat from head. Endif EndI have added the script to a Party Hat so I can use a quick key; this enables me to call my companion when she gets stuck. Begin OnEquip , SashaREF.moveto player, end. This works.My problem is:If I am wearing a hat or helmet or something already I have to open my inventory and re-equip it afterwards.Can someone help with an addition to detect if I am wearing a hat, save it, equip the Party hat to call my companion then re-equip the saved hat again?This is my first attempt at the script I don’t think it should be an OnEquip though as that would be the PartyHat not the one I was wearing before.Can anyone help me sort this out? Edited February 1, 2011 by Agnot2006 Link to comment Share on other sites More sharing options...
llamaRCA Posted February 1, 2011 Share Posted February 1, 2011 You can avoid a lot of this work by not assigning the party hat a slot at all. Leave it slot-less. Or give it a weird slot that isn't on the head; like one of the accessory ones that you don't use. Then you don't have to worry at all about what you are wearing. I have used the no-slot option before, for a released companion, figuring that I would never know what kind of gear a player could be wearing from another mod. If you do it that way you will get a warning whenever you open the GECK up, but it doesn't harm the performance of the mod in any way. :) llama Link to comment Share on other sites More sharing options...
davidlallen Posted February 1, 2011 Share Posted February 1, 2011 Instead of making a fake item to bring your follower, isn't it better to add to the follower script, so they never get far away in the first place? See this thread. The following code is recommended for the follower: if ((Condition1) || (condition2)) ; If I don't want teleport to occur else if (iFollow) ;following if (MyCompanionREF.GetDistance Player > 5000) MyCompanionREF.Moveto Player 50 50 0 endif endif endif Link to comment Share on other sites More sharing options...
rickerhk Posted February 1, 2011 Share Posted February 1, 2011 You can avoid a lot of this work by not assigning the party hat a slot at all. Leave it slot-less. I don't know why I keep forgetting this when it's the way I'm doing it too in my mod;) @Agnot2006so the two scripts that I posted for this in the Fallout3 forum aren't really required if you use a slotless item. The On Equip block still works. @DavidAllenThe teleporter is handy when your companion gets stuck in an interior cell and you can't get 5000 units away without leaving the cell. Link to comment Share on other sites More sharing options...
llamaRCA Posted February 1, 2011 Share Posted February 1, 2011 @DavidAllen. Re: companions and the handy-dandy calling them to you device. Oh, my, I wouldn't ever have a companion mod without one and almost always make one for any companion I like that doesn't have one. For one thing the script that calls them to you no matter what if you are 5000 units away doesn't kick in until you are 5000 units away. That's pretty far. When I'm playing as a player (I do that A LOT) and not as a modder I'm getting nervous long before that wondering where a missing companion's run off to. Having a "radio" or whatever you call it gives you control as a player to call the companion to you whenever you want to and it only takes a second to use. Besides, I frequently call my companions into locations where they aren't supposed to go per the game (I make devices for vanilla companions that I like to have with me). It's a fun little thing to have. I also always make an option so that the player can go to the companion as well. Link to comment Share on other sites More sharing options...
Agnot2006 Posted February 2, 2011 Author Share Posted February 2, 2011 An answer by Tefnacht on Fallout 3 Mod Talk forum has solved my problem by suggesting using an ingestible instead of a hat! For details of how Tefnacht suggests doing it (which works great) is on that forum. Thanks for all your suggestions. Link to comment Share on other sites More sharing options...
Recommended Posts