Famineman Posted February 10, 2015 Share Posted February 10, 2015 Hello all, I have been working on a custom spell I've been trying to create and I've run into an issue with only a portion of the spell functioning the way I'd like. The goal of the spell is once its cast on a aimed target it is inflicted with a poison that lasts for 5 sec, after 5 sec IF the target is below 30% health a set amount of damage is applied. As a final condition if the target died the caster receives a boost to weapon speed. The first part of the spell was very simple, however I've been trying a few various conditions to get the other parts of the spell to function correctly. Thus far I haven't been able to make it work and I came here for some help. I have the spell broken up into 3 magic effects, one for each part of the spell. Effect 1: The poison effect applied by the spell with a duration of 5 sec.Effect 2: A set amount of damage to be applied only if the target is below 30% health.Effect 3: If the target died from Effect 2, the caster gets a 10 sec boots to weapon speed. I've scoured the creation kit wiki looking at all other conditions and I fear that this spell is only possible via script. For effect 2 I've tried conditions like "GetActorValuePercent Health == 0.30 AND" .After various attempts and testing all I can tell is that only the effect 1 of the spell is actually happening. For testing purposes I've been testing each effect one at a time and thus have not yet tested effect 3. For the moment I'm seeking advice as how I can get effect 2 to work as intended. Help of any kind is greatly appreciated. Link to comment Share on other sites More sharing options...
HailHell Posted February 10, 2015 Share Posted February 10, 2015 effect one will need to be on a seperate magic effect since it uses a different effect archetype to the other 2 effects. For effect 2 and 3 you have to make sure that the effect archetype is set to script. Event OnEffectStart(Actor akTarget,Actor akCaster) float Hp = akTarget.GetActorValuePercentage("Health") if hp <= 0.30 ; u have to use <= instead because using == will only run the code bellow if the targets hp is exacly 0.30 ; Also And is written as && in papyrus ;do stuff endifendevent Link to comment Share on other sites More sharing options...
Recommended Posts