FoxiShandris Posted April 8, 2016 Share Posted April 8, 2016 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 BittercupTeleportSCRIPTbegin OnEquip bittercupref.moveto playerend 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 More sharing options...
vforvic Posted April 9, 2016 Share Posted April 9, 2016 How is Bittercup equipping this item? You cannot use a script to equip the item or OnEquip will not work. Link to comment Share on other sites More sharing options...
FoxiShandris Posted April 9, 2016 Author Share Posted April 9, 2016 (edited) 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 April 9, 2016 by FoxiShandris Link to comment Share on other sites More sharing options...
CarlCorey Posted April 9, 2016 Share Posted April 9, 2016 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 More sharing options...
vforvic Posted April 9, 2016 Share Posted April 9, 2016 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 More sharing options...
FoxiShandris Posted April 9, 2016 Author Share Posted April 9, 2016 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 More sharing options...
vforvic Posted April 10, 2016 Share Posted April 10, 2016 Never a waste to time. Always good to find out little things to look out for when modding. Link to comment Share on other sites More sharing options...
Recommended Posts