Mornedil Posted July 22, 2019 Share Posted July 22, 2019 (edited) I'm trying to create a damage over time effect and apply it to enemies, but it doesn't do anything. This is the part of the script that's supposed to add the damage over time: if (Myself.IsDismembered( )) if (Myself.AddSpell(BleedoutSpellProperty, false)) Debug.Notification("Limb Gone") else StartTimer(0.5) endIf endIfHere is the bleedout spell and magic effect: i'm getting the "Limb Gone" message which implies that the target has lost a limb and that the effect has been applied, but they don't take any damage. Help would be appreciated. I've also tried directly applying the bleedout spell to the player (for testing purposes), but the player doesn't take damage either, which leads me to believe there's something wrong with the effect. Edited July 23, 2019 by Mornedil Link to comment Share on other sites More sharing options...
hereami Posted July 22, 2019 Share Posted July 22, 2019 (edited) Probably, should use Spell.Cast(self, self). Or make it Ability, unevitable death anyways. Interesting, is OnCripple event somehow related to dismemberment (before, after?) ? Edited July 22, 2019 by hereami Link to comment Share on other sites More sharing options...
Mornedil Posted July 22, 2019 Author Share Posted July 22, 2019 Probably, should use Spell.Cast(self, self). Or make it Ability, unevitable death anyways. Interesting, is OnCripple event somehow related to dismemberment (before, after?) ? Thank you! Turning it into an ability worked. OnCripple is unrelated to dismemberment as far as I know. I'm using a timer event to periodically check if a limb has been dismembered, since I couldn't find any event that deals with it. Link to comment Share on other sites More sharing options...
hereami Posted July 22, 2019 Share Posted July 22, 2019 (edited) Maybe OnHit , then check if dismemberment occured after a short timer (if neccessary to have a pause) ? Edited July 22, 2019 by hereami Link to comment Share on other sites More sharing options...
Mornedil Posted July 22, 2019 Author Share Posted July 22, 2019 I was thinking about that, but it felt like that could be less optimized since fast weapons has the potential to run the code very often, and I also read somewhere that enchantments cause OnHit to trigger as well. there's a 0.5 delay on the timer loop right now, and I was thinking I could optimize it even further by only running the timer loop if the limb is in a bad condition Link to comment Share on other sites More sharing options...
hereami Posted July 22, 2019 Share Posted July 22, 2019 (edited) Well indeed, didn't think about it, but OnHit is a non-repeating event, so if there is a delay up to a few seconds before checking for limb state and registering for next cycle, may be not that demanding, and not a big need to apply bleeding immediately. Spell source can be ignored. Could be simply an Ability, which casts bleeding spell (or does release own mgef), when condition triggers. IsLimbGone condition is marked obsolete, but may work anyway (like GetHitLocation). If -1 is accepted as "any", then very good. And still, if concerning limb condition values, can limbs be dismembered, while having AV > 0 ?? Edited July 22, 2019 by hereami Link to comment Share on other sites More sharing options...
Recommended Posts