PoliteRaider Posted July 18, 2016 Share Posted July 18, 2016 Two problems I can spot here. 1. Apologies, I've steered you down the wrong path. It should be GetActorValue like you originally had, I just got confused about what we were doing with my last bit of advice. My bad and that's why you're getting all the type mismatch errors. 2. Add the SuperRing as a property to the script. In programming there's what's known as "namespace", which is where the same name can refer to different things based on where it is called. While the Creation Kit and game as a whole knows that there's something called a SuperRing, the script itself does not. It's not going to be able to search through the entire game to find the item referenced, it needs a local instruction to link it in to the SuperRing in the game. Link to comment Share on other sites More sharing options...
PoliteRaider Posted July 18, 2016 Share Posted July 18, 2016 Hi, everyone. I have a question regarding modding and the creation kit and I'm wondering if anyone on here can help me. I've recently created a simple companion mod. He is a synth who is 99% complete. However, there are two issues. One, whenever he is damaged, electricity appears and won't go away. Two, he attacks almost everybody. I've attempted to tweak things here and there to resolve these issues but I haven't been able to yet. Is there anyone here who would have any suggestions? Thanks! I'm sorry but you should start a new thread for this problem, as otherwise the advice may get mixed up and become more confusing that way. Link to comment Share on other sites More sharing options...
lndn95 Posted July 18, 2016 Share Posted July 18, 2016 Hi, everyone. I have a question regarding modding and the creation kit and I'm wondering if anyone on here can help me. I've recently created a simple companion mod. He is a synth who is 99% complete. However, there are two issues. One, whenever he is damaged, electricity appears and won't go away. Two, he attacks almost everybody. I've attempted to tweak things here and there to resolve these issues but I haven't been able to yet. Is there anyone here who would have any suggestions? Thanks! I'm sorry but you should start a new thread for this problem, as otherwise the advice may get mixed up and become more confusing that way. I started a new thread. I just joined so I had posted this here before seeing where to make a new post. Link to comment Share on other sites More sharing options...
Engager Posted July 18, 2016 Share Posted July 18, 2016 (edited) Jesus Christ.... In CK create new magic effect of type script, and attach script (and set it's properties) to that effect. Use created magic effect to create the enchantment, attach that enchantment to your ring or some other object using OMOD, template or by any other way. Script will auto activate when item will be equipped. Your script: Scriptname SuperEffects extends activemagiceffect ActorValue Property HealthAV Auto Const ActorValue Property RadsAV Auto Const ObjectReference ClownRef float HealTimer = 1.0 int HealTimerID = 32 float HPHealRate = 10.0 float RadHealRate = 5.0 Event OnEffectStart(Actor akTarget, Actor akCaster) ClownRef = (akTarget as ObjectReference) RegisterForRemoteEvent(akTarget as ObjectReference, "OnUnload") RegisterForRemoteEvent(akTarget, "OnDeath") StartTimer(HealTimer,HealTimerID) EndEvent Event OnTimer(int aiTimerID) If (aiTimerID == HealTimerID) If (ClownRef.GetValue(Rads) = 0.0) If (ClownRef.GetValuePercentage(HealthAV) < 1.0) ClownRef.ModValue(HealthAV, HPHealRate) EndIf Else If (ClownRef.GetValue(RadsAV) > 0) ClownRef.ModValue(RadsAV, -RadHealRate) EndIf Endif EndIF StartTimer(HealTimer,HealTimerID) EndEvent Event ObjectReference.OnUnload(ObjectReference akSender) CleanUp() EndEvent Event Actor.OnDeath(Actor akSender, Actor akKiller) CleanUp() EndEvent Event OnEffectFinish(Actor akTarget, Actor akCaster) CleanUp() EndEvent Function CleanUp() ClownRef = None CancelTimer(HealTimerID) UnregisterForAllEvents() Dispel() EndFunction Edited July 18, 2016 by Engager Link to comment Share on other sites More sharing options...
ozziefire Posted July 18, 2016 Author Share Posted July 18, 2016 (edited) Jesus Christ.... In CK create new magic effect of type script, and attach script (and set it's properties) to that effect. Use created magic effect to create the enchantment, attach that enchantment to your ring or some other object using OMOD, template or by any other way. Script will auto activate when item will be equipped. Your script:Thank you, after fixing a couple minor typos and reading PoliteRaiders post that compiled and now I have a better understanding how some of this Papyrus stuff works without resorting to invoking fictional deities :smile:. Edited July 18, 2016 by ozziefire Link to comment Share on other sites More sharing options...
PoliteRaider Posted July 18, 2016 Share Posted July 18, 2016 Isn't invoking deities pretty much the only way Papyrus works? :P I'm glad it's compiled for you at last. It's unfortunately not a guarantee that it's going to work in the sense of doing what you want but at least you know you've got rid of the errors and it'll work in the sense of loading up. Link to comment Share on other sites More sharing options...
Recommended Posts