Jump to content

How to access script properties attached to a magic effect attached to an actor?


Recommended Posts

Posted

I'm creating a mod where every actor is given a magic effect that contains a script which contains a set of properties. Via some dialogue fragment, the speaker reference is passed to quest script. I want to take that speaker reference and access the properties I mentioned earlier. What is the best way to do this?

 

Thanks

Posted

In case anyone else finds this thread searching for an answer:

 

You cannot access an activemagiceffect's script properties or functions from an external script.

 

It would be nice, but the engine does not allow for it.

 

You must instead use a modevent to get your activemagiceffect script to upload its data to an external script's properties.

 

So you don't get every instance of your effect trying to upload its own data at once, send the actor's form ID along with the modevent- then have a simple check in the activemagiceffect script to see if it matches GetTargetActor().GetBaseObject().GetFormID().

 

If anyone knows a function to output the reference ID rather than Form ID please tell me.

Archived

This topic is now archived and is closed to further replies.

  • Recently Browsing   0 members

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