Elleh Posted August 25, 2013 Share Posted August 25, 2013 Tried to do a little trick with the EquipItem function to force an NPC to equip a weapon he typically would not use. It does cause him to equip the weapon, but trying "abPreventRemoval = true" appears to not work. He can still unequip the weapon.... which puts a major wrench in my little plan. Preeeety sure I got the syntax right, but just in case this is the bit of script on a MagicEffect: Weapon Bow = (BowList.Getat(0) as Weapon) SomeActor.EquipItem(Bow, abPreventRemoval = true) Can someone confirm this as a bug? And if it is, is there a known workaround or another function to try? Link to comment Share on other sites More sharing options...
IsharaMeradin Posted August 25, 2013 Share Posted August 25, 2013 Syntax looks wrong.Try the following Weapon Bow = (BowList.Getat(0) as Weapon) SomeActor.EquipItem(Bow,true,true) The function defines the variables, you pass the values in proper order that you wish to use when you call the function. Link to comment Share on other sites More sharing options...
Elleh Posted August 25, 2013 Author Share Posted August 25, 2013 Huh. Okay.... off to try that. Didn't think I had a problem because the compiler didn't yell at me. *Shrug*Be back soon. Link to comment Share on other sites More sharing options...
Elleh Posted August 25, 2013 Author Share Posted August 25, 2013 Nope. Tried exactly what you had, and it doesn't seem to work. As before, he equips the bow but switches to something else the minute combat starts. Like I said: it is a weapon that, under normal circumstances, an NPC would never want to equip/use. After looking at the UnequipItem page, it appears there is some weirdness with NPC's and weapons. Meh. -_- Link to comment Share on other sites More sharing options...
Ulfric1 Posted August 25, 2013 Share Posted August 25, 2013 Nope. Tried exactly what you had, and it doesn't seem to work. As before, he equips the bow but switches to something else the minute combat starts. Like I said: it is a weapon that, under normal circumstances, an NPC would never want to equip/use. After looking at the UnequipItem page, it appears there is some weirdness with NPC's and weapons. Meh. -_-If you can't force him to use it, how about making the weapon more attractive to the ai? Unless that would break the purpose of your weapon, I'm not sure what you're trying to accomplish. Link to comment Share on other sites More sharing options...
Elleh Posted August 25, 2013 Author Share Posted August 25, 2013 If you can't force him to use it, how about making the weapon more attractive to the ai? Unless that would break the purpose of your weapon, I'm not sure what you're trying to accomplish. That's the problem exactly, actually. I'm trying to get him to use a bow from Recurve Longbows . The bows are powerful, but have a super slow draw time. This makes the damage per second equal "0". So the NPC thinks the bow does zero damage. -_- He'll use it if there are no bows in his inventory; but even so, he'd be just as likely to pick up a wooden bow off the ground and use that instead. I could try fiddling with it a bit, but it's the draw time that keeps the bow from being seriously OP. EDIT: You know..... I'm thinking I'll just make my own weapon for the purpose of this character. (Not saying anything against Grantiz's mod - it's still uber badass). I make it huge, but keep a more normal draw time and less damage. Then I could give it an enchantment with a small chance to one-shot things, like Mehrunes' Razor. Link to comment Share on other sites More sharing options...
Ulfric1 Posted August 25, 2013 Share Posted August 25, 2013 (edited) If you can't force him to use it, how about making the weapon more attractive to the ai? Unless that would break the purpose of your weapon, I'm not sure what you're trying to accomplish. That's the problem exactly, actually. I'm trying to get him to use a bow from Recurve Longbows . The bows are powerful, but have a super slow draw time. This makes the damage per second equal "0". So the NPC thinks the bow does zero damage. -_- He'll use it if there are no bows in his inventory; but even so, he'd be just as likely to pick up a wooden bow off the ground and use that instead. I could try fiddling with it a bit, but it's the draw time that keeps the bow from being seriously OP. Thats a tough one...how about putting an equip command within OnUnequip to force him to reequip the weapon? Event OnUnequipped(Actor Actref) Then have him equip the bow. You can then put in other conditions to limit when this line would run. Edited August 25, 2013 by Ulfric1 Link to comment Share on other sites More sharing options...
Elleh Posted August 25, 2013 Author Share Posted August 25, 2013 I tried something like that. What happens is, he just tries to re-equip a different bow over and over and over while in combat. I'll force him to unequip the standard bow, then equip the longbow...... then he'll unequip the longbow and the cycle just starts over...... Link to comment Share on other sites More sharing options...
Ulfric1 Posted August 25, 2013 Share Posted August 25, 2013 I tried something like that. What happens is, he just tries to re-equip a different bow over and over and over while in combat. I'll force him to unequip the standard bow, then equip the longbow...... then he'll unequip the longbow and the cycle just starts over......The only other thing I can think of then is to raise the weapon's speed just high enough to give it a DPS rating...maybe lower the damage a little to compensate? Link to comment Share on other sites More sharing options...
Elleh Posted August 25, 2013 Author Share Posted August 25, 2013 Yeah, I'm thinking I'll just need to make a new weapon to get the same effect - high cost, high reward. Like I said above in my edit, maybe lower the damage, up the speed, and either give it unusually high Crit damage, or a one-shot-kill chance a la Mehrunes' Razor. (Which would be highly appropriate, actually.... ahaha.../inside joke) Link to comment Share on other sites More sharing options...
Recommended Posts