Elias555 Posted January 10, 2017 Share Posted January 10, 2017 (edited) What's the best way to have an enchantment/spell effect apply to a weapon that will dispel once it's sheathed or time is out? eg, sword is out, fire spell, sword now does ice damage on hit, until the timer runs out. The way I was thinking but haven't tried or figured out the nitty gritty: Create enchantment that increases weapon reach. Spell script that gets enchantment, if return is 0, sets the enchantment to the created enchantment. The created enchantment has an OnUnequipped event to remove the enchantment and I'm hoping that compiles. Not sure about the timer. Edit: Check post 4 for an additional question. Edited January 11, 2017 by Elias555 Link to comment Share on other sites More sharing options...
lofgren Posted January 10, 2017 Share Posted January 10, 2017 There is actually a magic effect archetype called enhance weapon that does exactly what you want. Link to comment Share on other sites More sharing options...
xcafe Posted January 10, 2017 Share Posted January 10, 2017 I don't know if this is what Iofgren was talking about, but there's a dragonborn weapon called the BloodSkaal Blade that sounds like it does what you want, I'd consider mucking about with it in the CK. Link to comment Share on other sites More sharing options...
Elias555 Posted January 11, 2017 Author Share Posted January 11, 2017 (edited) There is actually a magic effect archetype called enhance weapon that does exactly what you want.ahahahaha, oh dear. Thanks. I don't know if this is what Iofgren was talking about, but there's a dragonborn weapon called the BloodSkaal Blade that sounds like it does what you want, I'd consider mucking about with it in the CK.If it uses the same archetype then it's the same thing. I don't want to make another thread so I'll just post here. Scriptname AceExtendReachScript extends activemagiceffect Float RealReach Weapon PlayerWeapon Event OnEffectStart(Actor akTarget, Actor akCaster) PlayerWeapon = Game.GetPlayer().GetEquippedWeapon() RealReach = PlayerWeapon.GetReach() Float NewReach = PlayerWeapon.GetReach() PlayerWeapon.SetReach(NewReach * 5) EndEvent Event OnEffectFinish(Actor akTarget, Actor akCaster) PlayerWeapon.SetReach(RealReach) EndEvent Sets it correctly but then it becomes permanent. Dropping the weapon doesn't seem to undo the changes. It's meant to last 5s. Also the shader is never applied.And I can't just use NewReach/5, once this is all figured out the equation will be based on stats that could be altered during the effect. Edited January 11, 2017 by Elias555 Link to comment Share on other sites More sharing options...
TheObstinateNoviceSmith Posted January 15, 2017 Share Posted January 15, 2017 Hey Elias, I'm far from a scripting person but if you were alright with utilizing SKSE, I believe you could use the SetEnchantment function (https://www.creationkit.com/index.php?title=SetEnchantment_-_Armor) combined with the Wait Utility (https://www.creationkit.com/index.php?title=Wait_-_Utility) to accomplish what this task. That way you can have one enchantment to increase range and one that restores it to normal. The one that extends the range will wait 5 seconds and then set the enchantment to the one that reduces the range back to normal. I could be over complicating it, like I said, I'm not a script guy really but I thought maybe this could/would help you out. Good luck. Link to comment Share on other sites More sharing options...
Elias555 Posted January 16, 2017 Author Share Posted January 16, 2017 Hey Elias, I'm far from a scripting person but if you were alright with utilizing SKSE, I believe you could use the SetEnchantment function (https://www.creationkit.com/index.php?title=SetEnchantment_-_Armor) combined with the Wait Utility (https://www.creationkit.com/index.php?title=Wait_-_Utility) to accomplish what this task. That way you can have one enchantment to increase range and one that restores it to normal. The one that extends the range will wait 5 seconds and then set the enchantment to the one that reduces the range back to normal. I could be over complicating it, like I said, I'm not a script guy really but I thought maybe this could/would help you out. Good luck.I think that would work too. But as lofgren said, there's an archetype that does the very thing and prevents exploitation without the need of a code. Link to comment Share on other sites More sharing options...
Recommended Posts