Scripting Problemo?

Discussions and questions about the CS and mods for Oblivion
Locked
Murcator
Initiate
Initiate
Posts: 31
Joined: Mon Dec 20, 2010 11:44 pm

Scripting Problemo?

Post by Murcator »

So I'm really new to scripting, but I'm tyring to make a Resurrect spell, this is my script:

Code: Select all

scriptname Resurrect

short updatecount

begin ScriptEffectStart
	Resurrect 1
End

Begin ScriptEffectUpdate
  set updateCount to updateCount + 1
End

Begin ScriptEffectFinish
  Message "Spell is finished. ScriptEffectUpdate was run %.0f times", updateCount
End
Everything goes fine right up until I cast it, no errors or anything, but it just doesn't do anything. The effect activates on the subject, but it doesn't rise.

Any help?
User avatar
PrinceShroob
Apprentice
Apprentice
Posts: 158
Joined: Wed Mar 17, 2010 7:58 pm
ES Games: Oblivion, Morrowind
Platform: Xbox 360, PC

Re: Scripting Problemo?

Post by PrinceShroob »

Script effects do not run on dead actors, the supposed target for your spell.

In addition, a note of warning - "resurrect 1" will erase any abilities that the target actor has: a resurrected High Elf will lose the elemental weaknesses, disease resistance, and fortified magicka. In the case of a race that has abilities and powers (for example, Nord; resits frost ability, shiled and frost damage powers), abilities are lost but I believe that powers remain.

Another problem is that resurrecting will still cause "getdeadcount" to ring true - if Jauffre dies, for example, not amount of console or script medling can change the fact that he is dead. However, "getdead" will run properly.
Locked