Game Development Community

Y-Axis Sorting without the level editor

by Peter Robinson · in Torque Game Builder · 09/17/2006 (11:51 pm) · 2 replies

I've dug pretty deep on this one and I can't find a thing. I want to use the Y-Axis sorting mode (one of the new cool fetures of 1.1.1) but I don't use the level editor since my game is close to done and I don't really want to start over. Everything out there simply says to click on the scene graph and use the Layer Management thing. I need to know the script calls for changing the sort modes for layers. If anyone can help, I would be extreamly greatful.

-Peter

#1
09/18/2006 (12:10 am)
This is the scene graph object from one of our levels in the AdvKit...

%levelContent = new t2dSceneGraph() {
   canSaveDynamicFields = "1";
   class = "level";
   UseLayerSorting = "1";
   layerSortMode0 = "Normal";
   layerSortMode1 = "Normal";
   layerSortMode2 = "Normal";
   layerSortMode3 = "Normal";
   layerSortMode4 = "Normal";
   layerSortMode5 = "Normal";
   layerSortMode6 = "Normal";
   layerSortMode7 = "Normal";
   layerSortMode8 = "Normal";
   layerSortMode9 = "Normal";
   layerSortMode10 = "Y Axis";
   layerSortMode11 = "Normal";
   layerSortMode12 = "Normal";
   layerSortMode13 = "Normal";
   layerSortMode14 = "Normal";
   layerSortMode15 = "Normal";
   layerSortMode16 = "Normal";
   layerSortMode17 = "Normal";
   layerSortMode18 = "Normal";
   layerSortMode19 = "Normal";
   layerSortMode20 = "Normal";
   layerSortMode21 = "Normal";
   layerSortMode22 = "Normal";
   layerSortMode23 = "Normal";
   layerSortMode24 = "Normal";
   layerSortMode25 = "Normal";
   layerSortMode26 = "Normal";
   layerSortMode27 = "Normal";
   layerSortMode28 = "Normal";
   layerSortMode29 = "Normal";
   layerSortMode30 = "Normal";
   layerSortMode31 = "Normal";
      cameraSize = "100 75";
      cameraPosition = "313 313";

So just set layerSortModeNN = "Y Axis"; on the layers you want sorting on.
#2
09/18/2006 (12:15 am)
Thanks Tom! That's exactly what I needed.

-Peter