Jump to content

Resurrection + Timer script help


Jollepoker

Recommended Posts

  Abramul said:
I believe OnDeath only runs once. Actually, looking at the original scripts, this may be the problem. I would suggest altering the preceding script like this:

 

scn MySecretScriptName

float timer

begin OnDeath
set timer to 25
PlayMagicShaderVisuals creatureEffectLichNether 30
end

begin GameMode

if( timer > 1 )
set timer to  timer - getSecondsPassed
if( timer <= 1 )
	PlaySound AMBThunder
	Resurrect 1
	set timer to 0
endif
endif
end

 

I'm not sure if you need to initialize the timer. From what I've seen, however, it appears you don't. You may want to wrap the if(timer>1)...endif in a GetDead, not sure about that.

 

Noticed a major logic error: since GetSecondsPassed isn't necessarily a whole number, using a timer==1 would likely prevent the script from working almost every time.

 

You could also just use an if/else, as shown here:

http://cs.elderscrolls.com/constwiki/index...etSecondsPassed

 

That one worked perfectly Abramul! Thanks! I make sure you get your credits :)

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...