Talk:DisableLinkChain - ObjectReference

From the Fallout4 CreationKit Wiki
Jump to navigation Jump to search

OnDisable event[edit source]

ObjectA -> ObjectB -> ObjectC

Where each -> is a linked ref relationship.

When you call DisableLinkChain(ObjectA), objects B and C will be disabled - VERY quickly. The downside, is that the papyrus functions on B & C are never called. So if you needed something to happen in response to them being disabled, you aren't given that chance. Tested overriding Disable, DisableNoWait, and DisableLinkChain on B and C and none of them seem to be called. It's useful for instantly toggling a large number of objects, but then you have to be sure to process any cleanup on those sub-objects yourself. If ObjectB and ObjectC can both get a reference to ObjectA, then a remote would solve this RegisterForRemoteEvent(ObjectA, "OnDisable"). Notes from Kinggath: Scrivener07 (talk) 2018-07-05T01:35:12 (EDT)


Question : Is the speed of this function close or equivalent to calling DisableNoWait within a while block on objectreferences? Or is it faster?

To answer my own question. It seems Using DisableLinkChain vs a while loop with DisableNoWait is about 6 times faster. This info is based off profiling data.