shadowsyllvet Posted July 22, 2012 Share Posted July 22, 2012 (edited) I know that in the OnActivate block you can use getActionRef to determine who activated the effect, but how do i figure out who equipped an object? i want to keep npc's from activating my scripts in my spelltome mod.scn SpellTome0001 short HasReadOnce begin onActivate activate if getActionRef == player if HasReadOnce == 0 message "Knowledge Gained" startquest QSpellTome0001 set HasReadOnce to 1 endif endIf end begin onEquip ;'[edit] i tried begin onEquip player and it compiles but it doesnt work in game' ;if getActionRef == player<--------need a working code equivalent here preferably non-OBSE if HasReadOnce == 0 message "Knowledge Gained" startquest QSpellTome0001 set HasReadOnce to 1 endIf endif end Edited July 22, 2012 by shadowsyllvet Link to comment Share on other sites More sharing options...
theuseless Posted July 22, 2012 Share Posted July 22, 2012 If it compiles as "begin onequip player" then it should only run when the player is the equipping ref. To make a check twice is redundant and a waste of processing power. Link to comment Share on other sites More sharing options...
shadowsyllvet Posted July 22, 2012 Author Share Posted July 22, 2012 begin onEquip player compiles but an in game test has shown that it did not work. I sat in the chorrol mages guild till some npc tripped the book and activated the quest for me Link to comment Share on other sites More sharing options...
WarRatsG Posted July 22, 2012 Share Posted July 22, 2012 "GetContainer" should work, because it will return the actor who is carrying the item. It's impossible for anyone to equip an item without carrying it, so it will work for you. But theuseless was right. "Begin OnEquip Player" will make the script only run when the player equips the item. If you use it correctly, it should work perfectly. Link to comment Share on other sites More sharing options...
shadowsyllvet Posted July 22, 2012 Author Share Posted July 22, 2012 i was using onEquip player and i saved the esp launched the game and tested it. it failed. so i back burner'd it for a while launched the game and miraculously it worked... go figure... Link to comment Share on other sites More sharing options...
Recommended Posts