Difference between revisions of "Death check with weapon script"

no edit summary
imported>Spd1274
imported>Spd1274
Line 3: Line 3:
== Introduction ==
== Introduction ==


I am currently working on a project that requires the Player to kill an NPC, and than adds an item upon the death of the NPC. Through much trial and error, I finally ran down how to achieve this. I intend to lay it out here, for those who might want to do something similar.
In the process of working on a project that requires the Player to kill an NPC, and than adds an item upon the death of the NPC, it became necessary to layout the steps for the project, and this seemed the best, and most helpful way to others, to do that.


So, in this tutorial, I will be guiding you in how to do several things:<br />
This Tutorial will follow the steps below:<br />
1. Create a Magic Effect Script that will check for the death of an NPC at the Player's hand, than add an Item to the inventory with a nice little message. <br />
1. Create a Magic Effect Script that will check for the death of an NPC at the Player's hand, than add an Item to the inventory with a nice little message. <br />
2. Create the item to be added, in this case, the soul of the NPC in the form of a bottled potion.<br />
2. Create the item to be added, in this case, the soul of the NPC in the form of a bottled potion.<br />
3. Create a scripted enchantment that runs our script. (Because there is no way to activate a script when the Player hits an NPC).<br />
3. Create a scripted enchantment that runs our script. (Because there is no way to activate a script when the Player hits an NPC i.e. Onstrike or anything of that kind. See: [http://cs.elderscrolls.com/constwiki/index.php/Begin Begin]).<br />
4. Finally create, and place into Tamriel, the weapon that will execute the script.
4. Finally create, and place into Tamriel, the weapon that will execute the script.


There is a rather good Tutorial on the Wiki that got me started on my path in this project, thought I should give it a nod, [http://cs.elderscrolls.com/constwiki/index.php/Deadcount_on_a_weapon Deadcount on a weapon].
There is a rather good Tutorial on the Wiki that got me started on my path in this project, thought I should give it a nod, [http://cs.elderscrolls.com/constwiki/index.php/Deadcount_on_a_weapon Deadcount on a weapon].
So without further ado, "Get on with it!"
----
Anonymous user