Okay. I narrowed it down to these lines. Note the lines between the <!--HERE--> comments. Those are the lines that if I remove them, the crash no longer happens, but those lines are vital to what the script does.
<event>
<if_distance name1="WG03c" name2="Artemis" comparator="LESS" value="40"/>
<if_timer_finished name="lockgate_WG03"/>
<!-- play cool warp sound, play at the start so it runs while the other stuff is being done below -->
<play_sound_now filename="wormgate_warp.wav"/>
<!-- set destination marker to just under the destination gate -->
<!-- location (1111,0,1111) is a dummy. The real location is set by copy_object_property below. -->
<create name="wormGateDestMarker" type="genericMesh" x="1111" y="0" z="1111"
meshFileName="dat/Missions/MISS_MyGodItsFullOfHoles/invisibleDummyShape.dxs"
textureFileName="dat/Missions/MISS_MyGodItsFullOfHoles/dummyTransparent.png"/>
<!--HERE-->
<copy_object_property name1="WG03d" name2="wormGateDestMarker" property="positionX"/>
<set_object_property name="wormGateDeskMarker" property="positionY" value="-500"/>
<copy_object_property name1="WG03d" name2="wormGateDestMarker" property="positionZ"/>
<!--HERE-->
<!-- lockout the gate pair for a bit to give the ship time to move away after it arrives -->
<set_timer name="lockgate_WG03" seconds="20"/>
<!-- trigger spinny disorenting effect -->
<set_timer name="warp_howlong" seconds="8"/>
<set_variable name="is_warping" value="1"/>
</event>
For reference, the WG03d object was previously created with the following statement, and thus has a positionX of 48000 and a positionZ of 50000:
<create name="WG03d" type="genericMesh"
meshFileName="dat/Missions/MISS_MyGodItsFullOfHoles/wormgate_shape.dxs"
textureFileName="dat/Missions/MISS_MyGodItsFullOfHoles/alienTransparentPlasma.png"
pushRadius="0.0"
colorRed="0.3" colorGreen="0.8" colorBlue="1.0"
x="48000" y="0" z="50000"/>
The intent of the above code is to create an object called "wormGateDestMarker" which is located at the same X,Z coordinates as WG03d, BUT is located at y = -500 so it will be down below the destination. I am doing this because that's how I record the destination where the ship will end up after it goes through some funky warp effects. At the end of a timer, I'll teleport the ship to the location of the destination marker, (but with Y=0 instead of y=-500).
Once in the past I encountered a weird bug where if you tried to make two objects occupy the same space, it placed the second one at some totally random location instead. I wonder if that's happening here and the random location its picking is out of bounds. The main reason for me using y = -500 was specifically to avoid that collision. But maybe the new version of Artemis has different collision detection. I don't know. I'm at wits end trying to figure this out.
[Last edited May 21, 2012 06:49:54]