Jump to content

Recommended Posts

Posted

I'm trying to make a script that teleports an NPC to your location upon equipping a certain item. I already made the item and attached a script I thought would work to it, but it does nothing.

 

My script is this:

 

  Quote
scn BittercupTeleportSCRIPT

begin OnEquip

bittercupref.moveto player
end

 

 

Bittercupref is the only thing the script would let me put in relation to the NPC I'm trying to move. Ref ID doesn't work, "Bittercup" doesn't work. I'm at a loss and getting frustrated.

 

Can anyone help?

Posted (edited)
  On 4/9/2016 at 2:15 AM, vforvic said:

How is Bittercup equipping this item? You cannot use a script to equip the item or OnEquip will not work.

 

Bittercup isn't equipping the item, the player is.

 

Edit: HUGE fan of your MERC series!

Edited by FoxiShandris
Posted

There must be something else going on. I just created both an armor and a weapon and attached that three line script to each. It worked fine in both cases. Does your script work with other NPC refids?

Posted

Not sure what item you are using, but remember OnEquip only works with items you can equip to a slot like Armor and only runs when you equip the item. If you want to attach the script to an item that you can only add to your inventory you need to use OnAdd instead.

 

Glad you like the Mod. We never thought it would go this far. :) Hopefully we can get the newest version released and stable soon. Looks good so far.

Posted
  On 4/9/2016 at 2:03 PM, vforvic said:

OnEquip only works with items you can equip to a slot

 

I realized my mistake and took a look at the item itself... Turns out I didn't assign a body slot for the apparel to occupy, so it was never actually being equipped, and that was the problem.

 

Sorry for wasting your time.

  • Recently Browsing   0 members

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