Is that possible? I couldnt ever set ActiveMagicEffect script as property and now I'm back to this topic.
Thanks.
Is that possible? I couldnt ever set ActiveMagicEffect script as property and now I'm back to this topic.
Thanks.
Can you be a bit more specific about what you're trying to do? I'm assuming the reason why you can't set an ActiveMagicEffect proprerty is due to the fact that each magic effect applied gets its own unique ActiveMagicEffect instance.
Well, mojo22, its good its you actually. I'm trying to find ActiveMagicEffect instance the similar way you find alias script instances in example here: http://www.gamesas.com/topic/1458562-referencealias-oninit-onreset-triggers/ - but other way around.
I would be casting "ActiveMagicEffect's" from Alias script OnSelf (in sense of same actor), then I want an ActiveMagicEffect script to modify ReferenceAlias scripts properties and have access to its functions.
[edit] Ok, I messed up an above description...
ActiveMagicEffect script would modify ReferenceAlias script
and ReferenceAlias script have "access" to ActiveMagicEffect <- two way communication basically
Is that possible with ActiveMagicEffects at all?
Ok still not entirely sure what shenanigans you're up to from your description, but I believe this communication is in fact possible . I just did a quick test before reading your post. I set up a quest and an ability, and allowed the quest to communicate with the activemagiceffect attached the ability that I add to the player.
Scriptname _Test_QuestChangeScript extends Quest _Test_AMEChangeScript Property kAME Auto ;initially none - but will get filled when the ActiveMagicEffect is appliedEvent OnInit() RegisterForSingleUpdate(5.0)endEventEvent OnUpdate() if kAME kAME.fCoolFloat = 7.7 Debug.Notification("We changed the AME float to "+kAME.fCoolFloat) else Debug.Notification("No AME detected") endIf RegisterForSingleUpdate(5.0)endEvent
Scriptname _Test_AMEChangeScript extends activemagiceffect float Property fCoolFloat Auto_Test_QuestChangeScript Property _Test_QuestAMEChanger Auto ;links to the quest script so we can tell it what ActiveMagicEffect instance to manipulateEvent OnEffectStart(Actor akTarget, Actor akCaster) _Test_QuestAMEChanger.kAME = selfendEventEvent OnEffectFinish(Actor akTarget, Actor akCaster) _Test_QuestAMEChanger.kAME = NoneendEvent
This method should work for you assuming my testing method was correct. Upon launching Skyrim, I got the repeating messages stating that no AME was detected. Then after adding the ability, I got the message stating that it detected the AME and successfully returned 7.7 for the float value.