Haugerud15328 Posted January 17, 2013 Share Posted January 17, 2013 On my mod I'm looking to make a shield that has the unrelenting force effect when you bash with it. I think I've figured out one way to do it but it would make the mod Dawnguard dependent and I don't want to do that. It's pretty easy to do for weapons but I'm not sure how to get it to work with a shield, any ideas? Link to comment Share on other sites More sharing options...
kromey Posted January 17, 2013 Share Posted January 17, 2013 I think this would work: Apply a script to your shield with two Events, OnEquipped and OnUnequipped: Perk Property yourAwesomePerkHere Event OnEquipped(Actor akActor) akActor.addPerk(yourAwesomePerkHere) endEvent Event OnUnequipped(Actor akActor) akActor.removePerk(yourAwesomePerkHere) endEvent (Note that I left off the header of the script for clarity's sake -- this is not a complete script, and will not work without the header!)You'll then want to create a new, invisible perk and use the Entry Point "Apply Bashing Spell" to apply your spell whenever your bash with the shield. (And don't forget to set your script's property to point to this perk!) Another script-free option would be to assign a unique keyword to your shield, and use that in a conditional on the Entry Point (not on the perk itself!) so that the Bashing Spell is only applied when you are using your shield. Of course, you'd still need to add the perk to the player somehow, but a simple start-enabled quest can do that easily enough via a script fragment (or you could use the script above and just removed the OnUnequipped event). There may be a perk-free alternative to accomplish the same thing, but I've been knee-deep in perks for a while, and as the old adage goes: "When all you have is a hammer, every problem looks like a nail!" Link to comment Share on other sites More sharing options...
BigKevSexyMan Posted January 17, 2013 Share Posted January 17, 2013 In terms of bashing spells, the only other way would be to register for animation events. It is weird that perks are used for casting spells like that, but it works extremely well. You don't need a script however, just make an enchantment with a constant self magic effect. On the magic effect there's a "Perk to Apply" drop down you can select your new perk from. Link to comment Share on other sites More sharing options...
Recommended Posts