Jump to content

cell reset script


DarthCareBear

Recommended Posts

Ok so ive been trying to get it to work for awhile and I dont understand how the scrept works well enough to fix this. Right now I have

 

Event OnActivate(ObjectReference akActionRef)

 

And then the same as you recomended earlier. Is there anything else I need to declare to get this script to work? As it is it compiles correctly and still doesnt reset the cell in the game. Any ideas? I know you guys have a lot more experience than I do. Thanks

Link to comment
Share on other sites

Remove the typo (see my post above). The script should look like this

Scriptname aaaareareset extends objectreference

Event OnCellDetach()

Cell Aaadsironmine = GetParentCell()
Aaadsironmine.reset()

Endevent

Now you can put it on the door reference in your interior cell. It will work.

Link to comment
Share on other sites

I had recognized the typo and tried it like that the first time. I will try this again when I get the chance to get on my computer again. For some reason my gf doesnt find it attractive when I geek out on the computer while shes at my house. Idk why... only the cool people do it. Thanks for the help.

 

Out of curiosity will it work the same if I use onActivate instead of onCellDetach?

Link to comment
Share on other sites

For activation:

 

 

Actor property PlayerRef auto
Cell property Aaadsironmine auto
 
AUTO STATE WaingForDetachment
Event OnActivate(ObjectReference akActionRef)
      if akActionRef == PlayerRef
          GoToState("Detachment")
      endif
EndEvent
ENDSTATE
 
STATE Detachment
Event OnCellDetach()
      if PlayerRef.GetParentCell() != Aaadsironmine
         Aaadsironmine.Reset()
     endif
EndEvent
ENDSTATE
 
;if you want it to keep resetting after each activation upon leaving, just add "GoToState("WaitingForDetachment") after the first statement in the OnCellDetach Event.
Link to comment
Share on other sites

Ok ive tried this terra nova (great show btw) but it still wouldnt reset after I left and came back. I dont understand why this is so difficult or what im doing wrong. It sounded to me like your way would work and it compiled correctly (I did fix your spelling errors as well)
Link to comment
Share on other sites

My guess would be that if the script fires instantly, the player may still inside the cell when the OnCellDetach event is called in the Detachment state.

 

Also, there's a warning in the CK Wiki saying that the OnCellDetach event is not reliable (http://www.creationkit.com/OnCellDetach_-_ObjectReference)

 

Have you tried Ghaunadaur's script?

Link to comment
Share on other sites

  • Recently Browsing   0 members

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