Jump to content

Creating Magic Effect to Deplete Player Magicka


Recommended Posts

Posted (edited)

I spent a good deal of time playing around with it, but I can't seem to make an armor enchantment work.

 

What I have is a code that is capable of depleting magicka 'directly', when called from an active quest script on a player actor reference. However, my goal is to make a cursed collar feature similar to what SLS has. Prior to looking into SLS's script, I attempted to attach a Magic Effect to an Enchantment inside CK. Then, in two separate tests, I applied this enchantment to a normal vanilla footwear and a DD collar.

 

If GetEnchantment() didn't retrieve the enchantment I wanted to apply, script would continue to armorItem.SetEnchantment(enchantment)

 

While the enchantment was applied successfully, the Magic Effect never fired its OnEffectStart() event. Is this not how these functions work?

 

I think my upcoming test will be more similar to how SLS does it. However, instead of attaching the script to any collar armor reference aliases, I'm thinking of attaching a magic effect as spell to player quest alias. Then, I'll set conditionals to activate the spell if:

- magic license feature is enabled

- no magic license

- has collar equipped (or has worn item with collar keyword)


Any tips would be appreciated.

Edited by Gyra
Posted

I'm not sure what you want to cause the enchantment to trigger but if it is a specific scenario maybe you can make script like this to fire when the scenario triggers

 

(I forgot the exact syntax)

 

get equipped

if (specific item) is equipped

apply magic effect

 

I'm currently learning scripting so I'm interested on following this topic in case I can pick up something.

Posted (edited)

check this rings and just replace the MGEF and Item.

Under conditions the quest state.

 

 

 

 

Edited by Tlam99

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

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