Ressurection Script Troubles

Post » Sat Jun 23, 2012 7:33 pm

I'm trying to setup a script that on the death of a draugr checks whether another draugr is alive and ressurects the first if that's the case. This is part of the script:

Event Ondeath(Actor akKiller)	Utility.Wait(5)		if boss.IsDead() == 0		reanimateSpell.Cast(Self, Self)	EndifEndEvent

The first draugr is set as dead to begin with and the strange thing is that it ressurects as soon as I enter the area it's in but doesn't when I kill it myself. Any ideas what's up?
User avatar
Queen Bitch
 
Posts: 3312
Joined: Fri Dec 15, 2006 2:43 pm

Post » Sun Jun 24, 2012 7:29 am

Event Ondying(Actor akKiller)	Utility.Wait(5)		if boss.IsDead() == false		reanimateSpell.Cast(Self, Self)	EndifEndEvent

I made some changes and now it doesn't ressurect as soon as I enter the area but when I kill it it ressurects regardless of whether the 'boss' draugr is dead or not.

Also, the general setup of everything is the same as in the Lokir's Tomb tutorial, with a 'boss' draugr that jumps out of a tomb and two other draugrs nearby that ressurect when that happens.
User avatar
Symone Velez
 
Posts: 3434
Joined: Thu Sep 07, 2006 12:39 am

Post » Sun Jun 24, 2012 3:11 am

Is the boss property set up correctly, ie pointing to the right draugr
User avatar
Marnesia Steele
 
Posts: 3398
Joined: Thu Aug 09, 2007 10:11 pm

Post » Sun Jun 24, 2012 7:27 am

Yes it is.
User avatar
Hope Greenhaw
 
Posts: 3368
Joined: Fri Aug 17, 2007 8:44 pm

Post » Sun Jun 24, 2012 4:46 am

It seems like it takes quite a bit of time before the game registers that the boss draugr is dead. Around 5-10 seconds maybe. Is this usual?
User avatar
JaNnatul Naimah
 
Posts: 3455
Joined: Fri Jun 23, 2006 8:33 am

Post » Sun Jun 24, 2012 1:52 am

Well, you do have a 'wait' command in the script for 5 seconds.
User avatar
SWagg KId
 
Posts: 3488
Joined: Sat Nov 17, 2007 8:26 am

Post » Sun Jun 24, 2012 8:28 am

have you tried checking the bosses health instead of using isdead()
User avatar
Genevieve
 
Posts: 3424
Joined: Sun Aug 13, 2006 4:22 pm

Post » Sat Jun 23, 2012 10:20 pm

Yes, but this script only runs on the death of the other draugrs. It goes like: draugr dies -> wait 5 sec -> check if boss draugr == dead. And even if I kill the boss draugr a couple of seconds before I kill the other draugrs they still ressurect.
User avatar
Danger Mouse
 
Posts: 3393
Joined: Sat Oct 07, 2006 9:55 am

Post » Sun Jun 24, 2012 10:41 am

Does GetActorValue("health") give the current health or the full health of the actor?
User avatar
daniel royle
 
Posts: 3439
Joined: Thu May 17, 2007 8:44 am


Return to V - Skyrim