In my case, I'm not trying to dynamically change any flags, just the position. I've defined the sky element and the scene flag doesn't work.

Code:

sky skysphere // define the sky object - only works if a block with a sky texture is given
{
type = <skysphere.mdl>;
layer = 3; // pick a number, any number (or is it card?)
flags = scene, visible; // scene flag
}

function scaled_sky()
{
var scaling = 4;
proc_late(); // required to prevent odd effects from occurring

while (!skysphere) // wait until pointer is valid
{
wait(1);
}

while(1)
{
/* // sky doesn't move if commented out, but does in reverse when not
// plus, this worked normally when a normal entity is used, but not for a sky
skysphere.x=camera.x/scaling*(scaling-1); // sets positions
skysphere.y=camera.y/scaling*(scaling-1);
skysphere.z=camera.z/scaling*(scaling-1);
*/
wait(1);
}
}



This is my sky definition as I have it. When I move the camera to a certain direction, the sky object disappears and it moves in reverse. Without the object being as a sky, when I moved the camera forward, I could see the texture "grow" meaning that I was getting closer to it. With it being a sky, when I move the camera forward, I see the texture "shrink" and at a much more rapid rate, the opposite. When you go toward something, it appears to get bigger, so why, when defined as a sky, does it get smaller? It's reversed!? Weirder yet, if I pan the camera in just the right direction, halfway between north by east and due north, the sky sphere just disappears all together. The object, however, is still supposedly not being put into the back end of the buffer to be drawn behind everything else....


"You level up the fastest and easiest if you do things at your own level and no higher or lower" - useful tip My 2D game - release on Jun 13th; My tutorials