Difference between revisions of "Talk:Detect Player Cell Change (Without Polling)"
Jump to navigation
Jump to search
Talk:Detect Player Cell Change (Without Polling) (edit)
Revision as of 20:13, 14 August 2016
, 20:13, 14 August 2016Better solution for load doors
imported>BeamerMiasma |
imported>BeamerMiasma (Better solution for load doors) |
||
Line 40: | Line 40: | ||
I think I've found an easier and lighter solution to solve the existing problems with the original method. From my testing this works perfectly, I haven't been able to outrun it. First follow the directions of the original posted method - I suggest using a copy of the XMarker object rather than an invisible fork to prevent any havok interaction. The only necessary addition is a script on the ObjectReference of the placed invisibleObject itself with the following content: | I think I've found an easier and lighter solution to solve the existing problems with the original method. From my testing this works perfectly, I haven't been able to outrun it. First follow the directions of the original posted method - I suggest using a copy of the XMarker object rather than an invisible fork to prevent any havok interaction. The only necessary addition is a script on the ObjectReference of the placed invisibleObject itself with the following content: | ||
Scriptname StalkerObjRefScript Extends ObjectReference | <nowiki>Scriptname StalkerObjRefScript Extends ObjectReference | ||
Actor Property PlayerREF Auto | Actor Property PlayerREF Auto | ||
Event OnCellDetach() | Event OnCellDetach() | ||
MoveTo(PlayerREF) | MoveTo(PlayerREF) | ||
Debug.Trace(Self + ": Tracker detected cell detach, moved to to cell " + GetParentCell()) | Debug.Trace(Self + ": Tracker detected cell detach, moved to to cell " + GetParentCell()) | ||
EndEvent | EndEvent</nowiki> | ||
The original spell & script will handle the moving of the invisibleObject whenever the PC walks between connected cells, and the OnCellDetach event on the ObjectReference will handle the moving between loadscreen doors. This event will also make the object 'catch up' in case it gets stuck somehow so there is no need for an OnUpdate event, keeping it polling free. | The original spell & script will handle the moving of the invisibleObject whenever the PC walks between connected cells, and the OnCellDetach event on the ObjectReference will handle the moving between loadscreen doors. This event will also make the object 'catch up' in case it gets stuck somehow so there is no need for an OnUpdate event, keeping it polling free. |