Jump to content

Get MagicEffect instance from Actor


Dreagar

Recommended Posts

I'm working on a vampirism overhaul mod, and one of the targets/goals I've set myself is that NPCs can contract the new form of vampirism and feel it's effects, eg dying from lack of blood. The problem is that in order to do the whole vampire feeding thing, I have to use perks. And that prevents me from accessing the blood amounts stored in the vampirism MagicEffect script on the actor. (I've redone feeding, it works on a "blood level" system, as opposed to time, the variables for it being stored in the script instances for each vampire.)

 

So, is it possible to get an instance of a MagicEffect from a given actor, knowing the base class for said effect?

Thanks in advanced guys.

Link to comment
Share on other sites

I don't think you can do that, no, but there are other methods you could use. For example, you could store the value via tokens (unplayable, therefore invisible, pieces of armour) in their inventory.

 

Cipscis

 

Hmm, that might come in useful for another system, but sadly tokens can only hold so many values, so I'm sticking with a custom ArrayList system that script instances register themselves to, and are tracked from there. It should work as long as I don't need more than 128 vampire instances.

 

Thanks for the help anyways!

Also, could a mod lock or delete this?

Edited by Dreagar
Link to comment
Share on other sites

  • Recently Browsing   0 members

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