Issue Data
|
Issue #28327: DelayedAmbushScript: Unable to call SetValue - no native object bound to the script object
[01/03/2020 - 06:45:03PM] error: Unable to call SetValue - no native object bound to the script object, or object is of incorrect type
stack: [ (000A1ABF)].DelayedAmbushScript.SetValue() - "<native>" Line ? [ (000A1ABF)].DelayedAmbushScript.OnReset() - "g:\_F4\Art\Raw\Scripts\DelayedAmbushScript.psc" Line 38 |
This script is obviously not unbound: even the error log shows that it is running on a valid ref.
000A1ABF is a leveled actor. Apparently, the script tried to manipulate the actor before it was created by the game (the game has to evaluate a leveled list and subsequently dig into templated actor records, so this will take a little time). This would also explain why this error doesn't show up on the logs more frequently because it all depends on when the OnReset event fires. Compared to other events that fire when a cell starts loading, OnReset fires in no particular order: it may fire very early (right after OnCellAttach) or very late (after OnLoad). For this error to occur, OnReset has to fire early, within a small time window.
There's not much we can do about that. I could try to improve the script (e.g. setting a tracking bool when OnReset fires and let the code from the OnReset be processed by the OnLoad event) but I doubt that this will be worth the hassle: all the OnReset event does is to modify two actor values. Now, if a new actor is placed after a reset, his actor values have the values specified on his actor records. If there was any reason to be unhappy with these, the script should logically try to modify them on first load as well - but it doesn't (neither from an OnInit event nor from the initialization function that runs on first load and after a reset). Conclusion is that the code in the OnReset event that will be skipped when this error occurs is not required for the script to work.
000A1ABF is a leveled actor. Apparently, the script tried to manipulate the actor before it was created by the game (the game has to evaluate a leveled list and subsequently dig into templated actor records, so this will take a little time). This would also explain why this error doesn't show up on the logs more frequently because it all depends on when the OnReset event fires. Compared to other events that fire when a cell starts loading, OnReset fires in no particular order: it may fire very early (right after OnCellAttach) or very late (after OnLoad). For this error to occur, OnReset has to fire early, within a small time window.
There's not much we can do about that. I could try to improve the script (e.g. setting a tracking bool when OnReset fires and let the code from the OnReset be processed by the OnLoad event) but I doubt that this will be worth the hassle: all the OnReset event does is to modify two actor values. Now, if a new actor is placed after a reset, his actor values have the values specified on his actor records. If there was any reason to be unhappy with these, the script should logically try to modify them on first load as well - but it doesn't (neither from an OnInit event nor from the initialization function that runs on first load and after a reset). Conclusion is that the code in the OnReset event that will be skipped when this error occurs is not required for the script to work.
Showing Comments 1 - 1 of 1