ToxicWhiteout Posted September 24, 2013 Share Posted September 24, 2013 What I'm looking for is a way to make an npc equip something after you complete a quest. The quest entails going to an armory and getting lots of reinforced leather armor and various weapons (some lever actions shotguns, service rifles, etc.) and bringing them back to the head guard. I want to make it so when you complete the quest, all of the guards in the town's armor is upgraded from leather armor to reinforced leather armor and their weapons are upgraded as well. Any help would be appreciated. Side note: There are about 10 guards in the town, and if I have to make a new script for every one of them I'd be fine with just upgrading the guards at the front gate or something. Link to comment Share on other sites More sharing options...
Belthan Posted September 25, 2013 Share Posted September 25, 2013 If you wanted to re-equip a whole faction, or the entire wasteland, you could probably do something clever with leveled lists, but for 10 the most straightforward way is to equip each guard individually. You don't need separate scripts attached to each guard. You can just put all of the code in the result script for the final quest stage. If you want a delay between turning the items in and having the guards equip them, you can set a flag in the quest stage and put the code inside a timer in the GameMode block of the quest script. For example: Gaurd1REF.additem myNewArmor 1 Gaurd1REF.additem myNewWeapon 1 Gaurd2REF.additem myNewArmor 1 Gaurd2REF.additem myNewWeapon 1 etc.If the new items have better stats than their old items, they will equip them automatically when added to their inventory. Link to comment Share on other sites More sharing options...
ToxicWhiteout Posted September 25, 2013 Author Share Posted September 25, 2013 If you wanted to re-equip a whole faction, or the entire wasteland, you could probably do something clever with leveled lists, but for 10 the most straightforward way is to equip each guard individually. You don't need separate scripts attached to each guard. You can just put all of the code in the result script for the final quest stage. If you want a delay between turning the items in and having the guards equip them, you can set a flag in the quest stage and put the code inside a timer in the GameMode block of the quest script. For example: Gaurd1REF.additem myNewArmor 1 Gaurd1REF.additem myNewWeapon 1 Gaurd2REF.additem myNewArmor 1 Gaurd2REF.additem myNewWeapon 1 etc.If the new items have better stats than their old items, they will equip them automatically when added to their inventory. Thanks! I'll be sure to try this and let you know how it works out. Link to comment Share on other sites More sharing options...
ToxicWhiteout Posted October 2, 2013 Author Share Posted October 2, 2013 It worked! Thanks so much for the help :) Link to comment Share on other sites More sharing options...
Recommended Posts