Difference between revisions of "Cell Attachment Analysis"
imported>Rasikko (Created page with "This more of a self reminder for myself but I hope it proves useful to others. It's been proven that cell attachment/detachment is the result of the engine checking a bool on...") |
imported>Rasikko |
||
Line 3: | Line 3: | ||
It's been proven that cell attachment/detachment is the result of the engine checking a bool on the objectreference as to whether or not its cell is/was attached/detached. See [[OnCellAttach - ObjectReference]] talk page. | It's been proven that cell attachment/detachment is the result of the engine checking a bool on the objectreference as to whether or not its cell is/was attached/detached. See [[OnCellAttach - ObjectReference]] talk page. | ||
However, I'm going to extend the basic info about these two things a bit. | However, I'm going to extend the basic info about these two things a bit by breaking it down into 6 scenarios. | ||
Scenario 1<br> | |||
Player is in the reference's parent Cell: '''[OnCellAttach]'''<br> | |||
Player leaves the reference's parent Cell: '''[OnCellDetach]'''<br> | |||
<br> | |||
Scenario 2 | |||
Player is in the reference's parent cell: '''[OnCellAttach]'''<br> | |||
Reference moves to another cell: '''[OnDetachedFromCell]'''<br> | |||
-Because the reference has moved from its previously attached cell, to a cell that is currently not attached.<br><br> | |||
Scenario 3<br> | |||
Player is in the reference's parent cell: '''[OnCellAttach]'''<br> | |||
Player leaves the reference's parent cell: '''[OnCellDetach]'''<br> | |||
Reference moves to another cell: '''[OnAttachedToCell]'''<br> | |||
-Because the reference and the player both moved to the same cell and in the case of the reference, this new cell became attached.<br><br> | |||
Scenario 4<br> | |||
Player leaves the reference's newly attached parent cell: '''[OnCellDetach]'''<br><br> | |||
Scenario 5<br> | |||
Player is in the reference's parent cell from scenario 3: --<br> | |||
Reference moves back to the previous cell: '''[OnDetachedFromCell]'''<br> | |||
-Because the reference has moved from currently attached parent cell to the previous cell which was detached.<br><br> | |||
Scenario 6<br> | |||
Player is in the cell that the reference just left from scenario 5: --<br> | |||
Player moves back to the previous cell where the reference is: '''[OnCellAttach]'''<br> | |||
Player leaves the reference's parent cell: '''[OnCellDetach]'''<br> | |||
--[[User:Rasikko|Rasikko]] ([[User talk:Rasikko|talk]]) 2021-10-15T15:30:21 (EDT) | --[[User:Rasikko|Rasikko]] ([[User talk:Rasikko|talk]]) 2021-10-15T15:30:21 (EDT) |
Revision as of 11:19, 17 October 2021
This more of a self reminder for myself but I hope it proves useful to others.
It's been proven that cell attachment/detachment is the result of the engine checking a bool on the objectreference as to whether or not its cell is/was attached/detached. See OnCellAttach - ObjectReference talk page.
However, I'm going to extend the basic info about these two things a bit by breaking it down into 6 scenarios.
Scenario 1
Player is in the reference's parent Cell: [OnCellAttach]
Player leaves the reference's parent Cell: [OnCellDetach]
Scenario 2
Player is in the reference's parent cell: [OnCellAttach]
Reference moves to another cell: [OnDetachedFromCell]
-Because the reference has moved from its previously attached cell, to a cell that is currently not attached.
Scenario 3
Player is in the reference's parent cell: [OnCellAttach]
Player leaves the reference's parent cell: [OnCellDetach]
Reference moves to another cell: [OnAttachedToCell]
-Because the reference and the player both moved to the same cell and in the case of the reference, this new cell became attached.
Scenario 4
Player leaves the reference's newly attached parent cell: [OnCellDetach]
Scenario 5
Player is in the reference's parent cell from scenario 3: --
Reference moves back to the previous cell: [OnDetachedFromCell]
-Because the reference has moved from currently attached parent cell to the previous cell which was detached.
Scenario 6
Player is in the cell that the reference just left from scenario 5: --
Player moves back to the previous cell where the reference is: [OnCellAttach]
Player leaves the reference's parent cell: [OnCellDetach]