Jump to content

Basic Scripting Help


FoxiShandris

Recommended Posts

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:

 

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?

Link to comment
Share on other sites

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?

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

  • Recently Browsing   0 members

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