I have tried it.
Look:
////////////////////////////////////////////////////////////////////
#include <acknex.h>
#include <default.c>
////////////////////////////////////////////////////////////////////
ENTITY* my_sky;

function bright_lights()
{
vec_add(my_sky.blue,vector(10, 10, 10));
}

function dim_lights()
{
vec_add(my_sky.blue,vector(-10, -10, -10));
}

function main()
{
on_1 = bright_lights;
on_2 = dim_lights;
level_load ("");
my_sky = ent_createlayer("blood_gorge+6.tga", SKY | CUBE | SHOW, 0);
while (1)
{
if (key_w) camera.x += 2;
if (key_s) camera.x -= 2;
if (key_a) camera.pan += 2 * time_step;
if (key_d) camera.pan -= 2 * time_step;
if (19 == key_lastpressed) // if the [R] key is pressed
{
camera.pan = 0; // restore the initial pan
camera.tilt = 0; // and tilt angles
vec_set(my_sky.blue,vector(128,128,128)); // set a medium sky brightness
}
wait (1);
}
}
But its not working and I don't know what to do.

Last edited by Ragada; 08/23/11 13:03.