Difference between revisions of "Talk:DisableLinkChain - ObjectReference"
Talk:DisableLinkChain - ObjectReference (edit)
Revision as of 23:57, 25 October 2019
, 23:57, 25 October 2019→OnDisable event
imported>Qazaaq (→OnDisable event: new section) |
imported>Rasikko |
||
(One intermediate revision by the same user not shown) | |||
Line 6: | Line 6: | ||
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 <code>RegisterForRemoteEvent(ObjectA, "OnDisable")</code>. Notes from Kinggath: [[User:Scrivener07|Scrivener07]] ([[User talk:Scrivener07|talk]]) 2018-07-05T01:35:12 (EDT) | 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 <code>RegisterForRemoteEvent(ObjectA, "OnDisable")</code>. Notes from Kinggath: [[User:Scrivener07|Scrivener07]] ([[User talk: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. |