Difference between revisions of "Common Bugs"

1,003 bytes added ,  20:14, 14 April 2014
Added a MoveTo Oddity and some text to an existing one
imported>QQuix
(Added text about deleted references in the Construction Set)
imported>QQuix
(Added a MoveTo Oddity and some text to an existing one)
Line 131: Line 131:
== MoveTo Oddities ==
== MoveTo Oddities ==
When using MoveTo, you should be careful to avoid several problematic situations, described below.
When using MoveTo, you should be careful to avoid several problematic situations, described below.
===MoveTo prevents other scripts to run===
MoveTo seems to crash the script engine until next frame, as no other script runs after you use it.
Not very clear whether the above statement is really true in absolutely all scenarios, but it can be repeatedly proven with the following setup:
#Create a scripted container (ObjA) that uses MoveTo, say, every other frame.
#Create a scripted container  (ObjB) that prints its own FormID to the console every frame.
#Place one ObjA in an exterior cell
#Place one ObjB in the cell to the West of ObjA and one ObjB in the cell to the East
Since the engine runs reference scripts on cells from West to East and from South to North, on frames where ObjA uses MoveTo, the ObjB placed to the East will not run its script.


=== MoveTo Crash on Loading Destination Cell ===
=== MoveTo Crash on Loading Destination Cell ===
Line 147: Line 158:


In some situations, using MoveTo on an Actor may ''appear'' to not work right unless the destination has a valid pathgrid to guide them. The symptom of this problem is that the MoveTo appears to work normally, but the Actor remains at the target only for a few seconds, then is moved to a nearby pathgrid in the same cell. The solution is to make sure the target area for a MoveTo on an Actor has a valid pathgrid, using World...Edit Cell Grid Path in the Construction Set. This isn't really a problem with MoveTo, but it can seem to be such until you realize the underlying cause.
In some situations, using MoveTo on an Actor may ''appear'' to not work right unless the destination has a valid pathgrid to guide them. The symptom of this problem is that the MoveTo appears to work normally, but the Actor remains at the target only for a few seconds, then is moved to a nearby pathgrid in the same cell. The solution is to make sure the target area for a MoveTo on an Actor has a valid pathgrid, using World...Edit Cell Grid Path in the Construction Set. This isn't really a problem with MoveTo, but it can seem to be such until you realize the underlying cause.
Another workaround, in cases where you don’t want/can’t place a pathgrid node at the destination spot, is to use SetPos to (re)position the actor just after the MoveTo, as SetPos does not snap actors to pathgrid nodes as MoveTo does.


==Deleted references in the Construction Set==
==Deleted references in the Construction Set==
Anonymous user