Holy Water Scripting?

Post » Mon Nov 29, 2010 2:10 pm

Basically, I am looking for a script that would make an Actor resurrect after a short time when killed unless a specific Item was used when activating the Actors corpse. I have looked at the Shivering Isles Scripts associated with Priests of Order and the Clanfather, but frankly I don't understand them enough to reverse engineer them, and I cannot find a previous topic covering it. Is there an easy way of Scripting this?
User avatar
Anthony Diaz
 
Posts: 3474
Joined: Thu Aug 09, 2007 11:24 pm

Post » Mon Nov 29, 2010 6:57 am

The way I did this in my Vampirism Mod was to use a non-playable Item as a Token on the required NPC, and have that do a check for when the Character was dead:

Short DeathDoneRef TargetShort ResurrectTimerBegin GameMode  Set Target to GetContainer  If ( Target.GetDead == 1 )     If ( DeathDone == 0 )        Set ResurrectTimer to ( GetRandomPercent ) ; Makes it between 1-99        Set ResurrectTimer to ( ResurrectTimer * 100 ) ; Makes it between 100 and 9,900     EndIf   EndIf   If ( Target.GetItemCount [SpecialItem] >= 1 )     Return ; Stops the Rest of the Script from running  EndIf  If ( ResurrectTimer > 0 )    Set ResurrectTimer to ( ResurrectTimer - 1 )  EndIf  If ( ResurrectTimer == 1 )     Target.Resurrect 1  EndIfEnd


This may not be the perfect way to do it, but it worked reliably for me-- it can easily be modified into a Script for an Actor. The other thing with this version is that it relies on an object being placed on the Corpse when exploring the body-- but that should be easy to modify, if you want to actually have to use it on them.

Hopefully this will help a little :)
User avatar
Tikarma Vodicka-McPherson
 
Posts: 3426
Joined: Fri Feb 02, 2007 9:15 am

Post » Mon Nov 29, 2010 9:07 am

Ohh, looks useful - and a very fast reply. Thanks!
User avatar
Jerry Jr. Ortiz
 
Posts: 3457
Joined: Fri Nov 23, 2007 12:39 pm


Return to IV - Oblivion