Jump to content

Respawning MovableStatic references?


Recommended Posts

A recent conversation on the thread for my Big Junk mod led to this... The items in my mod are MiscObject versions of MovableStatic items that seem quasi-logical that you could collect. Rather than Search-and-Replace all of the references, I added a script to the MovableStatic forms that disable/delete the MS and replace it with the MO.

 

It appears, however, that the MovableStatic references do not respawn when the cell resets. I checked the Creation Kit and the MS references in the Corvega plant are labelled as Respawn.

 

Does anyone have any idea why they are not respawning when the cell resets?

 

Thanks in advance

 

~GKX

 

EDIT: Nevermind, figured it out. It sucks, but I figured it out. What respawns is not so much the cell as the EncounterZone, which the MovableStatics are not linked to, like, say, stimpaks are. Nope, that wasn't it either.

Edited by GenghisKhanX
Link to comment
Share on other sites

That's because they are created refs. Refs placed in the CK respawn , they are a part of the cell so they respawn together with the cell. Other non persistent objects will be deleted when the cell resets. Though it's posible to make objects persistent, but it also increases memory load and you'd have to track them all to remove persistence if they are scrapped, otherwise they get stuck in the world forever in disabled state.

Edited by kitcat81
Link to comment
Share on other sites

I'm not sure I follow. If I disable my mod and toss a couple grenades around the corvega plant, displacing the MovableStatic items, they go back in place when the cell resets, right?

 

Maybe it's my script...

Scriptname _gkx_newbigjunk extends ObjectReference

MiscObject Property Replacement Auto Const
Bool Done = FALSE

Event OnLoad()

	If IsDisabled() || IsDeleted() || IsDestroyed()
		Return
	EndIf
	If Done
		Return
	EndIf

	Done = TRUE
	SetScale( 0.0 )
	BlockActivation( True )
	Disable()
	PlaceAtMe(Replacement, 1, FALSE, FALSE)

EndEvent

This is adapted from a script someone else wrote for me in my early days of modding. I know a lot more about scripting now, but am unfamiliar with the engine implementation of things like Disable() and BlockActivation().

 

Any thoughts?

 

~GKX

Link to comment
Share on other sites

I was prpbably tired and did not understood the problem . Sorry. I thought that your script placed objects do not respawn. Can't tell about all objects, but destrcuctible objects do not reset and as far as I know disable/enable state doesn't change after reset. Though it works a bit different with pre-placed corpses. Other disabled objects can stay in disabled state forever unless some script enables them. You can find more info about cell reset in the CK wiki ("Cell reset" article) .

Link to comment
Share on other sites

  • Recently Browsing   0 members

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