Tasheni Posted March 17, 2017 Share Posted March 17, 2017 Today I have a problem with outfit setting. I ordered my companion to care for the horses and take the saddles off. Same script is used by me for setting the follower outfits and that works fine. But for the horses it works not as I intended: Saddle will be only removed, if I get into another cell and than come back. Script is simple and looks like that: Outfit Property Saddle AutoActor property Vala Auto ;that's the horse Vala.SetOutfit(Saddle)Vala.EquipItem(Saddle)Vala.EvaluatePackage() Compiles, scene is properly playing, Eldrid fires her dialog, animation is playing, but the saddle doesn't vanish. I created an outfit that has no things in it and in ck it shows the unsaddled horse right.When I come to think, the follower outfits are changing when I go from an interior cell to outdoors or the other way round. Is there a better way to script this event? Link to comment Share on other sites More sharing options...
PeterMartyr Posted March 18, 2017 Share Posted March 18, 2017 Followers Auto Equip, horse don't, so lets use some detail to help it along.... Actor Property Horse Auto Armor Property OldSaddleArmor Auto ; the AMO in the Saddle Oufit. Outfit Property SaddleDummy Auto Outfit Property Saddle Auto Int asCount = Horse.GetItemCount(OldSaddleArmor) ; As a Safely for repeat uses Horse.RemoveItem(OldSaddleArmor, asCount) Horse.SetOutfit(SaddleDummy) ;To dress Horse.SetOutfit(Saddle) ;if required I've never dress a horse before so let's be safe again. If(Horse.GetItemCount(OldSaddleArmor)== 0) Horse.AddItem(OldSaddleArmor) Horse.EquipItem(OldSaddleArmor) else Horse.EquipItem(OldSaddleArmor) EndIf Link to comment Share on other sites More sharing options...
Tasheni Posted March 18, 2017 Author Share Posted March 18, 2017 Thank you, PeterMartyr, I think, I understand this script and will implement it today. I didn't know that followers auto equip - perhaps that behavior is overwritten in my game from Convenient Horses mod. I noticed, that followers don't draw their weapons, when player does with this mod active. For testing my horses, I disabled it.Yesterday I crawled through many scripting tutorials, but, huch, that's really not mine. I'm glad to get help here and very simple scripts I can do myself but that's all - thank you so much for helping me out. I'm pretty sure, the next question stands already in the doorframe :) Greetings, Tasheni Link to comment Share on other sites More sharing options...
Tasheni Posted March 18, 2017 Author Share Posted March 18, 2017 So now I've tested and the problem was another as I will explain further down. First, your script gave me an error with the if - else consruct, when the saddle should be equiped: If(Horse.GetItemCount(OldSaddleArmor)== 0) Horse.AddItem(OldSaddleArmor) Horse.EquipItem(OldSaddleArmor) else Horse.EquipItem(OldSaddleArmor) EndIf required (...)+ loop did not match anything at input "EquipItem". ??? I've double checked the properties, all were right and pointing to the right items. I deleted the else condition and it works. The first part compiles fine, but same thing as before: saddle is not removed. I've set it up as the default outfit under actor, and that seems to be the problem: If I put the saddle as armor into inventory, my horse doesn't wear it from beginning (strange, because in ck it does). Now the functions of equip and unequip and also remove and add item work pretty good. Can't understand, because my follower have also default outfits set and there's no problem with these functions.So all works fine, if the saddle is an armor and put into the inventory and the default outfit is set to none. I resolved the ability to do the order twice by setting a global variable, that changes if dialog for removing saddle was done, so only the second order for saddle horse shows up and vice versa. It is all so easy, if one grasps how things can be done - but to find out is hard and sometimes frustrating. What the heck - let's have fun! Thank you for your help. Link to comment Share on other sites More sharing options...
Recommended Posts