Jump to content

Container Remote Access via Spell. Need Help Please.


hwoodiwiss

Recommended Posts

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

if the player is the only one thats ever going to be casting this spell, you shouldn't need that if check

also, 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 spell

and 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 by cscottydont
Link to comment
Share on other sites

and be sure to hook the ObjectRef up in the scripts properties tab on the magic effect

It 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

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...