legendman Posted May 14, 2010 Share Posted May 14, 2010 Hello! I could really use help with this. I've been at it for about two days and I've gotten some help from a couple of friends, but still can't get it right. So here's what I want to do. I'm taking these spiffy tail armors http://www.tesnexus.com/downloads/file.php?id=18158 and making a script so that whenever an Argonian equips, for instance, a pair of leather greaves, they also equip the leather tail armor. I've gotten it to work for the player so far, and it works just fine, but I can't get it to affect NPCs. Here's my code so far: scn EquipArgonianLeatherTail ref tempRef begin OnEquip set tempRef to getcontainer if tempRef.GetIsRace "Argonian" == 1 message " " message " " tempRef.additem argonianleathertailarmour 1 tempRef.equipitem argonianleathertailarmour 1 endif end begin OnUnequip set tempRef to getcontainer if tempRef.GetIsRace "Argonian" == 1 message " " message " " tempRef.unequipitem argonianleathertailarmour 1 tempRef.removeitem argonianleathertailarmour 1 endif end The script is on the greaves, but I'm not sure what the problem is. I even waited by Right-Wind as he slept, and he didn't equip the tail when he woke up and put on his leather greaves. Link to comment Share on other sites More sharing options...
thePhilanthropy Posted May 14, 2010 Share Posted May 14, 2010 for test purposes, make it race-independent. if that works it means that Right-Wind is not argonian after all. if it doesn't help, read this article:http://cs.elderscrolls.com/constwiki/index.php/EquipItem i suspect it doesn't work because of the delay issue (mentioned in the article). Link to comment Share on other sites More sharing options...
legendman Posted May 14, 2010 Author Share Posted May 14, 2010 Thank you for replying. I don't really understand the equipdelay stuff, but I tried everything I could think of using it, and it sometimes would work on the player, but never on an NPC. Also, I don't know if this matters, but when I'm a non-Argonian and I put on some leather greaves, then bring up showracemenu and change to an Argonian, it doesn't equip the tail. Is it possible that since the NPCs already have the equipment, that OnEquip won't work? I tried removing the race part, too, with no luck. Link to comment Share on other sites More sharing options...
thePhilanthropy Posted May 14, 2010 Share Posted May 14, 2010 try this:scn EquipArgonianLeatherTail ref tempRef begin OnEquip set tempRef to getcontainer if tempRef.GetIsRace "Argonian" == 1 tempRef.additem argonianleathertailarmour 1 message " " message " " tempRef.equipitem argonianleathertailarmour 0 endif end begin OnUnequip set tempRef to getcontainer if tempRef.GetIsRace "Argonian" == 1 tempRef.unequipitem argonianleathertailarmour 0 message " " message " " tempRef.removeitem argonianleathertailarmour 1 endif end didn't work?then try this one SEVERAL times:scn EquipArgonianLeatherTail ref tempRef begin OnEquip set tempRef to getcontainer if tempRef.GetIsRace "Argonian" == 1 tempRef.additem argonianleathertailarmour 1 message " " message " " tempRef.equipitem argonianleathertailarmour 0 endif end begin OnUnequip set tempRef to getcontainer if tempRef.GetIsRace "Argonian" == 1 tempRef.unequipitem argonianleathertailarmour 0 message " " message " " endif end still nothing? also repeatedly. scn EquipArgonianLeatherTail ref tempRef begin OnEquip set tempRef to getcontainer tempRef.additem argonianleathertailarmour 1 message " " message " " tempRef.equipitem argonianleathertailarmour 0 end begin OnUnequip set tempRef to getcontainer tempRef.unequipitem argonianleathertailarmour 0 message " " message " " tempRef.removeitem argonianleathertailarmour 1 end Tell me if either of them worked. And if so, which one(s)? Link to comment Share on other sites More sharing options...
legendman Posted May 14, 2010 Author Share Posted May 14, 2010 Thanks again, but I'm afraid those didn't work. I also tried unequipping and equipping from the console, which didn't work. I tried doing that to see what would happen on the player, and it didn't work that way, even though it does through the inventory. It must have something to do with the way it's equipped, I suppose. This is driving me nuts. I can get NPCs to equip the armors if I manually add it to each of them and put a script on the tail, but that only worked with Begin GameMode, and I didn't think it would be a great idea to do that, and I thought this would be nicer anyway. Link to comment Share on other sites More sharing options...
thePhilanthropy Posted May 14, 2010 Share Posted May 14, 2010 Thanks again, but I'm afraid those didn't work. I also tried unequipping and equipping from the console, which didn't work. I tried doing that to see what would happen on the player, and it didn't work that way, even though it does through the inventory. It must have something to do with the way it's equipped, I suppose. This is driving me nuts. I can get NPCs to equip the armors if I manually add it to each of them and put a script on the tail, but that only worked with Begin GameMode, and I didn't think it would be a great idea to do that, and I thought this would be nicer anyway.have you tried each one several times over without resetting anything? I don't see why this doesn't work. I've written scripts that do exactly this several times already. Can you upload the esp somewhere? Maybe it's not the script after all? Link to comment Share on other sites More sharing options...
legendman Posted May 14, 2010 Author Share Posted May 14, 2010 Yeah I don't get why it didn't work either, it made no sense to me. Maybe it has to do with it being the tail slot, but anyway! I finally got it to work! I had to re-edit it several times, but here's what I finally came up with, and it works with both Khajiit and Argonians. scn EquipArgonianLeatherTail ref tempRef begin GameMode set tempRef to getcontainer if tempRef != player && tempRef.getequipped LeatherGreaves && tempref.getitemcount argonianleathertailarmour == 0 && tempRef.GetIsRace "Argonian" == 1 tempRef.additem argonianleathertailarmour 1 tempRef.equipitem argonianleathertailarmour 0 endif if tempRef != player && tempRef.getequipped LeatherGreaves && tempref.getitemcount khajiitleathertailarmour == 0 && tempRef.GetIsRace "Khajiit" == 1 tempRef.additem khajiitleathertailarmour 1 tempRef.equipitem khajiitleathertailarmour 0 endif end begin OnEquip set tempRef to getcontainer if tempRef == player && tempRef.GetIsRace "Argonian" == 1 message " " message " " tempRef.additem argonianleathertailarmour 1 tempRef.equipitem argonianleathertailarmour 0 endif if tempRef == player && tempRef.GetIsRace "Khajiit" == 1 message " " message " " tempRef.additem khajiitleathertailarmour 1 tempRef.equipitem khajiitleathertailarmour 0 endif end begin OnUnequip set tempRef to getcontainer message " " message " " tempRef.unequipitem argonianleathertailarmour 0 tempRef.removeitem argonianleathertailarmour 9 tempRef.unequipitem khajiitleathertailarmour 0 tempRef.removeitem khajiitleathertailarmour 9 end Now the only problem is that dropping pants while equipped doesn't get rid of the tail armor, and looting bodies doesn't either. Link to comment Share on other sites More sharing options...
Recommended Posts