hwoodiwiss Posted February 20, 2012 Share Posted February 20, 2012 I'm trying to make a spell that accesses a container as and when you need to and I can't see where my script is going wrong. If anyone could shed some light on the matter it would be much appreciated. (:Scriptname CSTStorageMatrixEffScr extends activemagiceffect Import Game ObjectReference Property CSTStorageMatrixContRef Auto Event OnEffectStart(Actor akTarget, Actor akCaster) CSTStorageMatrixContRef.Enable() If Game.GetPlayer() == akTarget && Game.GetPlayer() == akCaster CSTStorageMatrixContRef.Activate(akTarget) Endif EndEvent Link to comment Share on other sites More sharing options...
cscottydont Posted February 20, 2012 Share Posted February 20, 2012 (edited) if the player is the only one thats ever going to be casting this spell, you shouldn't need that if checkalso, I don't have much experience with manipulating ObjectRefs but I don't think you should need the .Enable() (unless it starts disabled for some reason?)what kind of spell is this attached to? I'd try a short duration, self target, fire and forget spelland be sure to hook the ObjectRef up in the scripts properties tab on the magic effect I'd try something like Scriptname CSTStorageMatrixEffScr extends ActiveMagicEffect ObjectReference Property CSTStorageMatrixContRef Auto Event OnEffectStart(Actor akTarget, Actor akCaster) ; CSTStorageMatrixContRef.Enable() ;idk if this is necessary CSTStorageMatrixContRef.Activate(akCaster) Debug.Notification("effect started") ;just to make sure the script is firing EndEvent Edited February 20, 2012 by cscottydont Link to comment Share on other sites More sharing options...
hwoodiwiss Posted February 20, 2012 Author Share Posted February 20, 2012 and be sure to hook the ObjectRef up in the scripts properties tab on the magic effectIt worked, i hadn't been connecting the reference to the script, in any of my (MANY MANY MANY) attempts, thank you, I shall credit you in the special thanks. (: Link to comment Share on other sites More sharing options...
Recommended Posts