Jump to content

Scripted effect to add filled soul gem


i395

Recommended Posts

I would like a script that would add a soulgem if you get a critical hit using something like sparks. Instead of disentegrate it would just add the soulgem to your inventory or even the corpse. I have been looking through several scripts and have tried adding them to the magic effect but nothing seems to work.

 

For example I added this script to the PerkDisintegrateConcAimed but it does not add the anything.

 

Scriptname _Soul_Gem_test extends ObjectReference
{Testing Soul gem give.}

SoulGem Property SoulGemGrand auto

Function OnActivate(ObjectReference akActionRef)
Game.GetPlayer().AddItem(SoulGemGrand, 2, false)
endfunction

Edited by i395
Link to comment
Share on other sites

For your example script you have the game call a GetPlayer. Why not try changing it to remove game and get player and adding player.additem....

 

That should allow you to get the actual soul gem. However, once you get your script working I would suggest using conditional statements to control which soulgem you would get based off of what target it you hit. As a chicken or a rabbit would produce a petty soul gem and a human NPC would produce a black soulgem.

Link to comment
Share on other sites

  • Recently Browsing   0 members

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