wardy164 Posted August 27, 2019 Share Posted August 27, 2019 Hi guys, I'm a complete novice when it comes to modding, but I enjoy playing around with the kit. Recently, I've tried making a staff enchantment which randomly casts a defined spell. Currently this works, but for the destruction spells i have assigned (i.e., fire storm, blizzard, thunderbolt) the spells correctly activate, but do not damage the target. Does anyone know how to rectify this please? This is my current script: Scriptname StaffScript extends ActiveMagicEffect spell property firestorm autospell property blizzard autospell property lightning autospell property illus autospell property illus2 autospell property alter autospell property alter2 autospell property restore autospell property conjure autospell property conjure2 autospell property conjure3 auto function OnEffectStart(Actor akTarget, Actor akCaster) Int random = utility.RandomInt(0, 10)if random >= 0 && random < 1firestorm.Cast(akTarget as objectreference)elseIf random >=1 && random < 2blizzard.Cast(akTarget as objectreference)elseIf random >= 2 && random < 3lightning.Cast(akTarget as objectreference)elseIf random >= 3 && random < 4illus.Cast(akTarget as objectreference)elseIf random >= 4 && random < 5illus2.Cast(akCaster as objectreference)elseIf random >= 5 && random < 6alter.Cast(akCaster as objectreference)elseIf random >= 6 && random < 7alter2.Cast(akTarget as objectreference)elseIf random >= 7 && random < 8restore.Cast(akCaster as objectreference)elseIf random >= 8 && random < 9conjure.Cast(akTarget as objectreference)elseIf random >= 9 && random < 10conjure2.Cast(akTarget as objectreference)elseIf random >= 10conjure3.Cast(akTarget as objectreference)endIfendFunction Thank you! Link to comment Share on other sites More sharing options...
wardy164 Posted August 27, 2019 Author Share Posted August 27, 2019 nvm, figured it out. Thanks :) Link to comment Share on other sites More sharing options...
Recommended Posts