politicpolice Posted August 16, 2017 Posted August 16, 2017 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
politicpolice Posted August 17, 2017 Author Posted August 17, 2017 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.
Recommended Posts
Archived
This topic is now archived and is closed to further replies.