Jump to content

Simple Script Help


theredheadhenry

Recommended Posts

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 by theredheadhenry
Link to comment
Share on other sites

That can be done without a script.

 

Make the Magic Effect Archtype: Value Modifier

Associated 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 by Rasikko
Link to comment
Share on other sites

That can be done without a script.

 

Make the Magic Effect Archtype: Value Modifier

Associated 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 by theredheadhenry
Link to comment
Share on other sites

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 by Rasikko
Link to comment
Share on other sites

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

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

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

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...