Resetting objects and cells what does it do exactly?

Post » Tue Jun 19, 2012 7:28 pm

What does cell reset actually do?

I am trying to make a huge area revert back to the way it once was. I want everyhting back at editor location. I am currently using a while statement and I have 80 actors in an array (in multiple cells) and tell hem to resurrect/reset. Neither seems to be working. This is REALLY important that I get this functioning semi-correctly...

If .reset() isn't the answer than what is? what does .reset() do.... the wiki is very bland on how it works exactly.
User avatar
Cesar Gomez
 
Posts: 3344
Joined: Thu Aug 02, 2007 11:06 am

Post » Tue Jun 19, 2012 9:49 pm

Well first, it would fire the OnReset() event for all scripts on whatever you're calling it on...if you put a script on the actors that http://www.creationkit.com/Resurrect_-_Actorthem in the OnReset event? I haven't played with ressurection functions yet...
User avatar
Blaine
 
Posts: 3456
Joined: Wed May 16, 2007 4:24 pm

Post » Wed Jun 20, 2012 1:36 am

is that all it does? It doesn't reset objects to their original place or enable state?
User avatar
Harry-James Payne
 
Posts: 3464
Joined: Wed May 09, 2007 6:58 am

Post » Wed Jun 20, 2012 4:10 am

Only if they have an OnReset() event defined that does so. So you will need to go to each NPC you want to affect, and store whether it is dead or alive, etc, store that information, and then define an OnReset event that does a Moveto to relocate the NPC where it was when it was saved, then ressurect it if it is dead and was not already dead when it's data was saved, etc.

Fortunately, this is fairly easy to do: Attach this script to your actors:

Scriptname StartConditionTrackerBool property IsAlive = True  auto ; Defaults to aliveFunction StoreStartData()  if IsDead()	 IsAlive = False  endifendFunctionFunction ReturnToStartState()  if IsDead() && IsAlive ; If he was alive before, but is dead now	Resurrect()  endif  MoveToMyEditorLocation()EndFunctionEvent OnInit()  StoreStartData()EndEventEvent OnReset()  ReturnToStartState()EndEvent
User avatar
Astargoth Rockin' Design
 
Posts: 3450
Joined: Mon Apr 02, 2007 2:51 pm


Return to V - Skyrim