Soul Cage Amulet

Post » Thu Oct 21, 2010 7:50 pm

Alright, I've got some of this mod figured out, but I don't know how to do the rest. I plan to make an amulet that, as long as you wear it, will register the deaths of nearby NPC's (not creatures) and add a "Captured Soul" that can then be either used like a normal soul gem, devoured to recover magicka, sent to attack enemies, used in a necromantic ritual or simply released (randomly fortifying one of the player's attributes). I think I have most of it down, but I'm having trouble with the amulet detection part. I was using OBSE's GetFirstRef/NextRef thing together with a "getdead" and a "short dead" to tell if it has already been counted, but I can't get it to work. I'm also unsure which would be better to use on the amulet, a script effect enchantment or an object script. Thanks for any help you give.

P.S. I'm kinda new to the whole scripting thing, so be gentle-ish.
User avatar
Matthew Aaron Evans
 
Posts: 3361
Joined: Wed Jul 25, 2007 2:59 am

Post » Fri Oct 22, 2010 8:00 am

Post your script that you currently have.
User avatar
Crystal Clarke
 
Posts: 3410
Joined: Mon Dec 11, 2006 5:55 am

Post » Thu Oct 21, 2010 11:43 pm

Alright. This is what I have. I got this method from the TESCS Wiki.


ref NPC
short dead

begin gameMode
if player.getequipped AASoulBeacon == 1
set NPC to GetFirstRef 35
while NPC
if dead == 0
if getdead NPC == 1
player.additem AASoulBeaconCapturedSoulITEM 1
set dead to 1
set NPC to getnextref
endif
endif
loop
endif
end
User avatar
dell
 
Posts: 3452
Joined: Sat Mar 24, 2007 2:58 am


Return to IV - Oblivion