shatsnazzle Posted April 16, 2018 Share Posted April 16, 2018 Hello all! I'm trying to figure out if it's possible to get and set properties on a specific actor's ActiveMagicEffect ScriptA from some other ScriptB. Getting and setting the properties on the base object Magic Effect ScriptA is simple enough but is this possible to do for an individual instance of the effect? For example I have ActorA and ActorB.I have Spell01 ability with Effect01 magic effect.Effect01 magic effect has ScriptA on it.ScriptA has property01 on it.I add Spell01 ability on ActorA and ActorB.But what if I want Effect01.property01 on ActorA to be different than Effect01.property01 on ActorB?Is there some way to access this property from another script? Thank you guys and girls! Link to comment Share on other sites More sharing options...
Reneer Posted April 16, 2018 Share Posted April 16, 2018 This may be overly complicated for your situation, but you could look into Custom Papyrus Events. I've used them in a few mods of mine and they are quite effective. Link to comment Share on other sites More sharing options...
shatsnazzle Posted April 16, 2018 Author Share Posted April 16, 2018 Thanks for the idea Reneer, I'll look into that see if it fits in. :) Link to comment Share on other sites More sharing options...
kitcat81 Posted April 16, 2018 Share Posted April 16, 2018 (edited) There is no way to access and change magic effect script from another script. With Actor and Object Reference scripts you can define it as (MyActor as MyScriptName), but it does not work with magic effects. So it's just impossible to make calls on it. But there are ways to use different properties for different actors. The easiest way is to add both properties or maybe a formlist of some objects as property and thjen select the required one based on some scripted checks and events. And you can use custom events for it just like Reneer said, but as I remember they must be defined in another ( not in a magic effect script) type of script otherwise I don't see how you would register for it.If you show the script and explain what exactly you want to achieve, it will be easier to suggest a way. Edited April 16, 2018 by kitcat81 Link to comment Share on other sites More sharing options...
Reginald001 Posted April 16, 2018 Share Posted April 16, 2018 (edited) You could set a global variable and check that in both scripts? Edited April 16, 2018 by Reginald001 Link to comment Share on other sites More sharing options...
shatsnazzle Posted April 16, 2018 Author Share Posted April 16, 2018 Thanks kitcat81, that's what I suspected. Thank you Reneer, Kitcat81, and Reginald 001 for the good ideas and the good info :) Link to comment Share on other sites More sharing options...
Recommended Posts