jiffyadvent Posted March 17, 2013 Share Posted March 17, 2013 Greetings,I've lately been trying to figure out how modify this script from the CK website tutorial to work on an NPC. ScriptName tutGlovesofBlizzardScript extends ObjectReference Spell Property Blizzard auto Event OnEquipped(Actor akActor) Game.GetPlayer().AddSpell(Blizzard) EndIf EndEvent I was thinking of using the console function "IsActor" if it is even possible to determine that the wielder of the weapon is an npc, but I dont quite know how to implement it. If anyone could help me out with this on how to make this work or write me the simple script I would really appreciate it..I also need it to work on the player and any actor that equips the object..Thanks Link to comment Share on other sites More sharing options...
scrivener07 Posted March 17, 2013 Share Posted March 17, 2013 ScriptName tutGlovesofBlizzardScript extends ObjectReference ;This script should be attached to the gloves Spell Property Blizzard auto ;Make sure to fill this in the ck Event OnEquipped(Actor akActor) ;This is "ON" the object being equipped if (akActor == game.getplayer()) ; If the player actor is picking THIS object up.. Game.GetPlayer().AddSpell(Blizzard) endif EndEvent Link to comment Share on other sites More sharing options...
scrivener07 Posted March 17, 2013 Share Posted March 17, 2013 I misread your post. Script above only adds the spell if the player is the actor. This will add the spell to whoever picks it up ScriptName tutGlovesofBlizzardScript extends ObjectReference Spell Property Blizzard auto Event OnEquipped(Actor akActor) akActor.AddSpell(Blizzard) EndEvent Link to comment Share on other sites More sharing options...
jiffyadvent Posted March 18, 2013 Author Share Posted March 18, 2013 I misread your post. Script above only adds the spell if the player is the actor. This will add the spell to whoever picks it up ScriptName tutGlovesofBlizzardScript extends ObjectReference Spell Property Blizzard auto Event OnEquipped(Actor akActor) akActor.AddSpell(Blizzard) EndEvent Thanks I was confusing the "akActor" function for something else. Link to comment Share on other sites More sharing options...
Recommended Posts