Okay, I managed to confirm something.
Preview mode does not really show how well the alpha sorting script is working. In fact, things look downright dodgy in that regard. However, when I am in the actual level (loaded) mode, things look MUCH better. Maybe not perfect, but head and shoulders above what preview mode looks like. I searched the site here a bit more and came across another camera mode that let me speed things up, and now I can move around fairly quickly. When I move past my trees, there are really no obvious sorting issues, though if I get up real close, I may see a leaf or two out of place, but hey, I'm not complaining.
Here are the scripts I'm now using, just for the record:
Main Level Script:
// ////////////////////////////////////////////////////////////////////////
// A6 main wdl:
// Created by WED.
////////////////////////////////////////////////////////////////////////
////////////////////////////////////////////////////////////////////////////
// The PATH keyword gives directories where template files can be found.
path "C:\\Program Files\\GStudio6\\template_6"; // Path to A6 templates directory
path "C:\\Program Files\\GStudio6\\template_6\\code"; // Path to A6 template code subdirectory
path "C:\\Program Files\\GStudio6\\template_6\\images"; // Path to A6 template image subdirectory
path "C:\\Program Files\\GStudio6\\template_6\\sounds"; // Path to A6 template sound subdirectory
path "C:\\Program Files\\GStudio6\\template_6\\models"; // Path to A6 template model subdirectory
path "C:\\Program Files\\GStudio6\\work";
/////////////////////////////////////////////////////////////////
// Filename of the starting level.
string level_str = <sprtest.WMB>; // give file names in angular brackets
////////////////////////////////////////////////////////////////////////////
// Included files
include <tree1.wdl>;
include <gid01.wdl>; // global ids
include <display00.wdl>; // basic display settings
Function Main()
{
freeze_mode =1;
level_load("sprtest.wmb");
wait(3);
freeze_mode = 0;
}
var cam_speed;
action camera_move
{
my.invisible = on;//this entity can't be seen
my.passable = off; //if you don't want collision detection
while(1)//always (while 1 = 1)
{
vec_set(camera.x,my.x);//camera's position is my position
cam_speed.x = (key_cuu - key_cud)*300*time;
my.pan -= 300*mouse_force.x*time;
my.tilt -= 300*-mouse_force.y*time;
camera.tilt = my.tilt;
camera.pan = my.pan;
ent_move(cam_speed,nullvector);
wait(1);
}
} And the alpha sorting script:
material mtl_vegetation
{
effect="
texture entSkin1;
pass p0 {
texture[0]=<entSkin1>;
zWriteEnable=true;
alphaBlendEnable=true;
cullmode=none; //renders both sides of a polygon
}";
}
action vegetation
{
my.material=mtl_vegetation;
} Many thanks to all who helped me get this far!
![](/ubbthreads/images/graemlins/grin.gif)