okokokok Posted April 4, 2011 Share Posted April 4, 2011 The Begin ScriptEffectFinish block runs with no regard for the enchantment effect it is bound too. How do i stop the lines inside ScriptEffectFinish block from running before the enchantment time is over? (enchantment effect duration is set to 30 sec) Link to comment Share on other sites More sharing options...
fg109 Posted April 5, 2011 Share Posted April 5, 2011 What's your script, and what do you have enchanted? (Armor enchantments are constant, so duration doesn't work, nor does the ScriptEffectUpdate and ScriptEffectFinish blocks.) Link to comment Share on other sites More sharing options...
okokokok Posted April 5, 2011 Author Share Posted April 5, 2011 What's your script, and what do you have enchanted? (Armor enchantments are constant, so duration doesn't work, nor does the ScriptEffectUpdate and ScriptEffectFinish blocks.) Weapon enchantment..... ;I need to find a way to make the begin scripteffectfinnish not run immidiatly scn GreatHalbredOfDualismSCRIPT Ref TargetRef Ref MyRef Ref BoneRef Float Timer Begin ScriptEffectStart set TargetRef to GetSelf if (GetPCInfamy >= GetPCFame) && (TargetRef.GetCreatureType == -1) && (TargetRef.GetDead == 1) Do stuff endif if (GetPCInfamy >= GetPCFame) && (TargetRef.GetCreatureType != -1) && (getrandompercent >= 80) do other stuff endif if (GetPCInfamy < GetPCFame) && (TargetRef.GetDead == 1) && (TargetRef.GetCreatureType == -1) do other other stuff endif if (GetPCInfamy < GetPCFame) && (TargetRef.GetCreatureType != -1) && (getrandompercent >= 80) do other other other stuff endif end ;Begin ScriptEffectUpdate ;if (timer < 30) ; set Timer to (Timer + ScriptEffectElapsedSeconds) ; Return ;endif ;end Begin ScriptEffectFinish remove a bunch of stuff end Link to comment Share on other sites More sharing options...
fg109 Posted April 5, 2011 Share Posted April 5, 2011 (edited) You're using it on dead bodies? :unsure: I'm pretty sure that all magic effect scripts only run for 1 frame on a dead target, and all the blocks fire at once. EDIT: By the way, you spell Halberd wrong. Edited April 5, 2011 by fg109 Link to comment Share on other sites More sharing options...
okokokok Posted April 5, 2011 Author Share Posted April 5, 2011 nvm the typos..... so what you are telling me is that ScriptEffectFinish will run immidiatly no matter what i do? no timers or anything will work? Im officaly f***ed? Link to comment Share on other sites More sharing options...
fg109 Posted April 5, 2011 Share Posted April 5, 2011 (edited) Well... you can still do it through a quest script or by using an activator. scn examplespellscript Begin ScriptEffectStart if (GetDead) set examplequest.target to GetSelf set examplequest.initialize to 1 set examplequest.fquestdelaytime to 0.1 endif ; do stuff End scn examplequestscript ref target short initialize float timer float fquestdelaytime Begin GameMode if (initialize) set timer to (timer + GetSecondsPassed) if (timer > 30) ; do stuff to target set timer to 0 set initialize to 0 set fquestdelaytime to 5 endif endif End Edited April 5, 2011 by fg109 Link to comment Share on other sites More sharing options...
lonewolfkai Posted April 5, 2011 Share Posted April 5, 2011 (edited) The Vyper and I had a discussion about this once regarding an enchantment that was using a burn effect. Here's what he had advised: I just tested it and, as it turns out, you'll need to use an actual script to force the Fire Damage shader to play. First, you need to make this script: scn FiveSecondBurnScript Begin ScriptEffectStart pms effectFireDamage end Begin ScriptEffectFinish sms effectFireDamage end IMPORTANT: Make sure the script is set as a Magic Effect (the default setting is Object). Now, you just need to add this script effect to your existing enchantment. Open your custom enchantment and select "add". Instead of selecting a normal effect (like Fire Damage), select Script Effect. Set the duration to 5 (or whatever the duration of your Fire Damage enchantment is set to). Now select your script from the Script Effect Info section (which is usually dark). Give your script effect a name (I named mine Burn). You can also choose what school of magic this effect belongs to, but that is only truly useful for script effect spells. You can also choose a visual effect, but that isn't necessary here because the script itself plays the effect. Click OK and you're done. The Fire Damage effect shader will now play for whatever duration you set it to, regardless of how strong any other enchantments are. Interestingly enough, the Damage Magicka effect shader also plays, but is hard to notice. Edited April 5, 2011 by lonewolf_kai Link to comment Share on other sites More sharing options...
okokokok Posted April 5, 2011 Author Share Posted April 5, 2011 Nice i got it working, just uploaded the mod too. Halberd Of Dualism. HO! Link to comment Share on other sites More sharing options...
Recommended Posts