Jump to content

Enchantment won't recast Magic Effect with valid conditions after I use a script in the Magic Effect to dispel it.


Recommended Posts

I have an armour enchantment that calls several magic effects depending upon conditions (all seperate conditions). Now this was working fine, but I wanted to add a condition that compared two actor variables with each other (Health and RadHealthMax). I couldn't see how to do that except with scripting. So I learnt how to do that and got it working, but now, after the script runs and casts Self.Dispel(), it won't proc again (unless I unequip/reequip).

I tried using a global variable to compare the gamehour as a condition, but that didn't seem to work either.

 

I just don't have the experience to know what I could do to fix the problem.

Any help appreciated, thanks.

 

 

Maybe I should explain what I'm trying to do.

 

I want to make a low-life setting. Hence I modified the perk "Immunetoradiation" and changed the entry point "mod rads for rad health max" to 650 (i.e. 1000 - 650 = 35% hp). That works fine on it's own.

 

Now i've got this other enchantment on a piece of armour that I want to run a magic effect on under certain conditions (immunetoradiation and HP is less than the 35%) However I can't find an easy condition to check for the 35% hp, I don't want to hard code it. RadHealthMax is a flat value, Health returns the max value but as a percentage only 35%, which isn't useful.

 

I've resorted to trying to run a script on the magic effect to set one of the actor variables to a global var so that i can then set a condition on the enchantment to check one AV against the other. This seems clumsy, as I have to set an inital value for the GVar to higher than my health and leave the script running to constantly check if the value changes.

Edited by littleerve
Link to comment
Share on other sites

If I understand your idea correctly, you might need to look at vanilla "MedicPumpEffect" script that checks your health and applies a stimpack to you if your health is too low. That way you can add different conditions to your script and only do something if all conditions are met.

Edited by kitcat81
Link to comment
Share on other sites

  • Recently Browsing   0 members

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