Skip to content

variable off activate item?

The following script isn't pulling the variable off the activated item. The PC gets the message string without the variable so I know the Unique Cast Spell is working. What else am I missing to grab that local variable off the item being activated?

oPC = GetItemActivator(); string vName = GetLocalString(OBJECT_SELF, "NAME"); SendMessageToPC(GetItemActivator(), "VAR NAME IS " + vName);

thanks in advance.

Comments

  • NeverwinterWightsNeverwinterWights Member Posts: 339
    edited February 2018
    A lot of the time this could just be that the variable was set on a copy of an item but not the blueprint item. I've done this in testing a lot and forget that my variables were't set right. Other than that it could be a mismatched svar name.
    *facepalms self*
    Post edited by NeverwinterWights on
  • DazDaz Member Posts: 125
    Try GetItemActivated() instead of OBJECT_SELF
    NeverwinterWightsshadguyBuddywarrior
  • ProlericProleric Member Posts: 1,269
    Exactly. OBJECT_SELF is the module, because it's a module event script.
    NeverwinterWightsshadguyBuddywarrior
  • BuddywarriorBuddywarrior Member Posts: 62
    Thank you for this!
Sign In or Register to comment.