Issue Data
|
Issue #20607: containerOpenIfEmpty - reference has no 3D and cannot have an animation played on it[05/27/2016 - 04:44:00PM] error: (0008C771): has no 3d and cannot have an animation played on it. stack: [ (0008C771)].containerOpenIfEmpty.PlayGamebryoAnimation() - "<native>" Line ? [ (0008C771)].containerOpenIfEmpty.OnLoad() - "<unknown file>" Line ? [05/27/2016 - 04:48:34PM] error: (0008C771): has no 3d and cannot have an animation played on it. stack: [ (0008C771)].containerOpenIfEmpty.PlayGamebryoAnimation() - "<native>" Line ? [ (0008C771)].containerOpenIfEmpty.OnLoad() - "<unknown file>" Line ? There are casts missing on the script. On a script, 'self' is the script instance, not the object on which it runs. "self.playGamebryoanimation" needs to be replaced by "(self As objectreference).playGamebryoanimation" (3 x). |
Are you sure this is necessary? Casting like that was never needed in Skyrim for stuff like this. Not saying you're wrong, but I just don't see anything to indicate you have to be this strict about calling functions on a script type the script already extends.
Arth hasn't posted an update about this here so I will. smkViper has said that this type of cast is not necessary.
What I think could actually be the issue is a lack of WaitFor3DLoad(). This error might be coming from a disabled object, in which case the wiki says:
----
Quote:
"If the object is disabled, it will receive the event when it enters the loaded area but obviously will not have its 3D."
----
Though if it is coming from a disabled object then maybe WaitFor3DLoad() isn't the best thing to do and instead it can have a:
<code>If IsDisabled()
return
EndIf</code>
at the top. This paradigm is even in the example on the OnLoad wiki page, though it's in the form of if/else which is unnecessary in this case and increases nesting.
What I think could actually be the issue is a lack of WaitFor3DLoad(). This error might be coming from a disabled object, in which case the wiki says:
----
Quote:
"If the object is disabled, it will receive the event when it enters the loaded area but obviously will not have its 3D."
----
Though if it is coming from a disabled object then maybe WaitFor3DLoad() isn't the best thing to do and instead it can have a:
<code>If IsDisabled()
return
EndIf</code>
at the top. This paradigm is even in the example on the OnLoad wiki page, though it's in the form of if/else which is unnecessary in this case and increases nesting.
Well ... the error is thrown by the OnLoad() event of the same object the errors claim has no 3D, and the code is not lengthy enough to infer a potential loss of 3D down the line:
<code>Event OnLoad()
debug.trace("Container: onLoad caught for "+self)
if getBaseObject() is Container
if getItemCount() == 0
self.playGamebryoanimation("Open"
debug.trace("Container: setOpen! "+self)
endif
endif
EndEvent</code>
Thus, WaitFor3DLoad() is very unlikely to cure anything here - unless we have to assume that the OnLoad event is entirely unreliable (which would be very bad news btw ....)
In fact, a disabled object is the only reasonable explanation for this error. I wasn't aware that disabled objects get this event too (thanks, Jon).
<code>Event OnLoad()
debug.trace("Container: onLoad caught for "+self)
if getBaseObject() is Container
if getItemCount() == 0
self.playGamebryoanimation("Open"
debug.trace("Container: setOpen! "+self)
endif
endif
EndEvent</code>
Thus, WaitFor3DLoad() is very unlikely to cure anything here - unless we have to assume that the OnLoad event is entirely unreliable (which would be very bad news btw ....)
In fact, a disabled object is the only reasonable explanation for this error. I wasn't aware that disabled objects get this event too (thanks, Jon).
0008C771 is //not// disabled. It's a container in the wilderness (cell -11,13) that starts enabled, has no enable parent, no linked reference and is also not used on any quests or scripts.
Other ideas ?
Other ideas ?
Couldn't the safety check for being disabled precede a WaitFor3DLoad() call and still work? Or would there be some marginal risk of something registering as being enabled but never quite being so?
Also, is this a widespread problem or has it just been with this one container?
Also, is this a widespread problem or has it just been with this one container?
Happens on all containers of this type (it's the greenish yellow wooden crates), but the containers themselves are not widespread so the errors are not permanently on your logs.
Clsoing this as an engine issue.
There is no logical explanation for this error and we have never been able to do anything about it. Also, despite of this error, there is no apparent malfunction; the script still does what it's supposed to do.
Best guess is that it has specifically to do with theFrankenstein gamebryo animation, and in that case, we couldn't do anything about it either.
There is no logical explanation for this error and we have never been able to do anything about it. Also, despite of this error, there is no apparent malfunction; the script still does what it's supposed to do.
Best guess is that it has specifically to do with the
Showing Comments 1 - 7 of 7