Resurrect Issues

Post » Fri Feb 18, 2011 10:44 pm

For a mod I am making, I am using Script Effects for many unique spells. For some reason, the spells to resurrect NPCs causes the game to crash if cast on a valid target. Here is the script I am using.

scn CHEATReviveref refbegin ScriptEffectStart	set ref to GetSelf	if (ref.getdead == 1)		resurrect	endifend


There is another script that is essentially the same, except it uses Resurrect 1 for standing up revival.
User avatar
Bird
 
Posts: 3492
Joined: Fri Nov 30, 2007 12:45 am

Post » Fri Feb 18, 2011 8:32 pm

Look at the WIKI: http://cs.elderscrolls.com/constwiki/index.php/Resurrect

Specifically this part:
The AnimateFlag appears to be optional when Resurrect is used from the Console, but not when used in script.

User avatar
Scotties Hottie
 
Posts: 3406
Joined: Thu Jun 08, 2006 1:40 am

Post » Sat Feb 19, 2011 5:30 am

Hmm, I am still having issues. What is the script equivalent to using just resurrect in the console? I don't get the animate flag thing.
User avatar
Justin Bywater
 
Posts: 3264
Joined: Tue Sep 11, 2007 10:44 pm

Post » Fri Feb 18, 2011 7:57 pm

I thought it was self explanitory.

Console:
resurrect

Script:
resurrect 1


I am not sure it would cause the CTD or not. But its a start.
User avatar
SiLa
 
Posts: 3447
Joined: Tue Jun 13, 2006 7:52 am

Post » Fri Feb 18, 2011 8:31 pm

resurrect 1 is used to cause the actor to stand up out of their death state. I want to use the script to resurrect them by resetting them completely.
User avatar
Prue
 
Posts: 3425
Joined: Sun Feb 11, 2007 4:27 am

Post » Sat Feb 19, 2011 10:51 am

resurrect and resurrect 1 are exactly the same function - a number flag (1) at the end of it just tells the game to play additional get up animation of the target and nothing else.
so, your only option here is to use resurrect 1 in your script, as without this flag the game crashes as you experienced yourself...
User avatar
james kite
 
Posts: 3460
Joined: Sun Jul 22, 2007 8:52 am

Post » Sat Feb 19, 2011 12:57 am

Try specifying a reference for the Resurrect function, like this:

Begin ScriptEffectStart	Set Ref to GetSelf	If Ref.GetDead == 1		Ref.Resurrect 1	EndIfEnd


And yes, you do have to put the 1 there. :thumbsup:

Edit: eep, sorry Trollf, didn't see you there! :foodndrink:
User avatar
Alister Scott
 
Posts: 3441
Joined: Sun Jul 29, 2007 2:56 am

Post » Sat Feb 19, 2011 3:45 am

Yeah, :lol: you need to specify the number when used in a script. ;)
User avatar
Laura Samson
 
Posts: 3337
Joined: Wed Aug 29, 2007 6:36 pm


Return to IV - Oblivion