Talk:DisableLinkChain - ObjectReference

Revision as of 01:35, 5 July 2018 by imported>Qazaaq (→‎OnDisable event: new section)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

OnDisable event

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)

Return to "DisableLinkChain - ObjectReference" page.