theredheadhenry Posted September 12, 2017 Share Posted September 12, 2017 (edited) I'm trying to write/ apply a script to a Magic Effect for a Spell. What I'm looking to do is have Stamina be drained while the spell is casting. The spell is a Aimed Concentration spell. Like Flames or Frostbite. So while the spell is casting in addition to draining Magicka, it also will drain stamina. Below is what I've come up with, I know it's not correct, I just don't know what I'm missing... Can someone please help with this? Do I need to do a OnSpellCast? {; Damage the player's stamina 10 points Game.GetPlayer().DamageActorValue("Stamina", 20.0)} Edited September 12, 2017 by theredheadhenry Link to comment Share on other sites More sharing options...
Evangela Posted September 12, 2017 Share Posted September 12, 2017 (edited) That can be done without a script. Make the Magic Effect Archtype: Value ModifierAssociated item: Stamina Check the box "Detrimental" Now on the spell, change the effects magnitude to 10. Also on the magic effect to the spell, add this condition to the magic effect: GetActorValuePercent: Stamina: >= 0.1 what this means is, you can drain stamina long as you have at least 10% stamina, to which otherwise, you'll need to wait to get over 10% to start draining again.If you don't want that, you can leave the condition out and it'll keep draining stamina for as long as you keep concentrating regardless if you're out of stamina or not. Edited September 12, 2017 by Rasikko Link to comment Share on other sites More sharing options...
theredheadhenry Posted September 12, 2017 Author Share Posted September 12, 2017 (edited) doh! Edited September 12, 2017 by theredheadhenry Link to comment Share on other sites More sharing options...
theredheadhenry Posted September 12, 2017 Author Share Posted September 12, 2017 (edited) That can be done without a script. Make the Magic Effect Archtype: Value ModifierAssociated item: Stamina Check the box "Detrimental" Now on the spell, change the effects magnitude to 10. Also on the magic effect to the spell, add this condition to the magic effect: GetActorValuePercent: Stamina: >= 0.1 what this means is, you can drain stamina long as you have at least 10% stamina, to which otherwise, you'll need to wait to get over 10% to start draining again. If you don't want that, you can leave the condition out and it'll keep draining stamina for as long as you keep concentrating regardless if you're out of stamina or not. This is what I have already, how do I add a second Assoc. Item? Or should I just delete everything I have already. I only want the players Magicka and Stamina to be depleted, not the enemy. They should only have health depleted. Thanks! (edit) I made a new Magic Effect that has what you suggested I do, and it's not working. See the screenshots below. I feel like I'm missing something... Edited September 12, 2017 by theredheadhenry Link to comment Share on other sites More sharing options...
Evangela Posted September 12, 2017 Share Posted September 12, 2017 (edited) Associate item 2 is when the ArchType is Dual Value Modifier, where the other item is then multiplied by AV weight(which I don't understand fully), you can experiment with that if you like. Otherwise, if you want to drain more than one actor value on the same spell, just make another magic effect. For having the enemy's health depleted and have the player's health and stamina depleted from the same spell.. you'll need to make a magic effect that affects only the enemy, and another magic effect that only affects the player. I hope I didn't confuse you there x_x. Edited September 12, 2017 by Rasikko Link to comment Share on other sites More sharing options...
theredheadhenry Posted September 12, 2017 Author Share Posted September 12, 2017 Associate item 2 is when the ArchType is Dual Value Modifier, where the other item is then multiplied by AV weight(which I don't understand fully), you can experiment with that if you like. Otherwise, if you want to drain more than one actor value on the same spell, just make another magic effect. For having the enemy's health depleted and have the player's health and stamina depleted from the same spell.. you'll need to make a magic effect that affects only the enemy, and another magic effect that only affects the player. I hope I didn't confuse you there x_x. Not sure if you saw my edit with the updated screens. I did a new effect, but it's not working. :( Link to comment Share on other sites More sharing options...
theredheadhenry Posted September 13, 2017 Author Share Posted September 13, 2017 Still having issues trying to figure this out. Which leads me to asking is it possible to apply multiple Magic Effects to a spell? I keep testing this, and for some reason certain ones don't work. :( Link to comment Share on other sites More sharing options...
theredheadhenry Posted September 14, 2017 Author Share Posted September 14, 2017 Bump. This is driving me crazy that I can't figure this out. I feel like im circling the answer. Would love some input on what I'm doing wrong here. Link to comment Share on other sites More sharing options...
lofgren Posted September 14, 2017 Share Posted September 14, 2017 Ignore the advice of the person above. They are incorrect. A script is the best way to go here because you cannot add magic effects with different targets to the same spell. Unfortunately it is not simple. I don't have time to get into it now. I just thought you should know that the person above is sending you down the wrong path. I will try to give more info later this week, but I don't know when I will have the time to sit down and do the proper testing so that I don't send you down a wrong path myself. Link to comment Share on other sites More sharing options...
theredheadhenry Posted September 15, 2017 Author Share Posted September 15, 2017 Ignore the advice of the person above. They are incorrect. A script is the best way to go here because you cannot add magic effects with different targets to the same spell. Unfortunately it is not simple. I don't have time to get into it now. I just thought you should know that the person above is sending you down the wrong path. I will try to give more info later this week, but I don't know when I will have the time to sit down and do the proper testing so that I don't send you down a wrong path myself.Ah that explains it. I thought I was on the right track with my original script... Wouldn't it just be easier to apply the "is running" script to say something like: if is using magic attack example1, example2, example3, then apply running stamina effect drain Please let me know when you get a chance, I appreciate the help and will credit you in my MOD :D Link to comment Share on other sites More sharing options...
Recommended Posts