Since there are a bit lacking of beginner examples I ran one with this great example from Aum65.
Everything works BUT snow , so If anyone would be so kind to point out the nono part with particles I (and more people i think) would love to see the solution.

Partly solved the entity/particle switch for Lite-C but something still lacking

I converted this with the ideas from
The big C-Script to Lite-C Converter Post and the ReplaceEm tool (made a .bkr fileset if anyone is interested?, need some more tweaking still, according to my comments in code below

).
Btw Tested with A7 Engine - Commercial Edition V7.04.2 - Jul 3 2007
\\CJ
Code:
///////////////////////////////////////////////////////////////
#include <acknex.h>
#include <default.c>
/////////////////////////////////////////////////////////////////////////////////////////////
var rain_on = 0;
var snow_on = 0;
var fog1_on = 0;
var fog2_on = 0;
var fog3_on = 0;
var fog4_on = 0;
var rain_handle; // handle for the rain.wav sound
var snow_handle; // handle for the snow.wav sound
var day = 0;
/////////////////////////////////////////////////////////////////////////////////////////////
BMAP* snow_tga = "snow.tga";
/////////////////////////////////////////////////////////////////////////////////////////////
STRING* work40_wmb = "work40.wmb";
STRING* rain_tga = "rain.tga";
/////////////////////////////////////////////////////////////////////////////////////////////
SOUND* rain_wav = "rain.wav";
SOUND* snow_wav = "snow.wav";
/////////////////////////////////////////////////////////////////////////////////////////////
function fade_snow();
function snow_particles();
function toggle_snow();
function snow_sound();
function rain_sprites();
function toggle_rain();
function rain_sound();
function toggle_daynight();
/////////////////////////////////////////////////////////////////////////////////////////////
action players_code() // simple player and 1st person camera code
{
player = my; // I'm the player
set(my,INVISIBLE); // no need to see player's model in 1st person mode
while (1)
{
// move the player using the "W", "S", "A" and "D" keys; "10" = movement speed, "6" = strafing speed
c_move (my, vector(6 * (key_cuu - key_cud) * time_step, 4 * (key_cul - key_cur) * time_step, 0), nullvector, IGNORE_PASSABLE | GLIDE);
vec_set (camera.x, player.x); // use player's x and y for the camera as well
camera.z += 30; // place the camera 30 quants above the player on the z axis (approximate eye level)
camera.pan -= 5 * mouse_force.x * time_step; // rotate the camera around by moving the mouse
camera.tilt += 3 * mouse_force.y * time_step; // on its x and y axis
player.pan = camera.pan; // the camera and the player have the same pan angle
wait (1);
}
}
/////////////////////////////////////////////////////////////////////////////////////////////
function toggle_snow()
{
snow_on += 1;
snow_on %= 2;
VECTOR snow_origin;
var i;
while (!player) {wait (1);}
snow_sound();
while (snow_on)
{
i = 0;
while (i < 50) // that's a "while without wait" loop
{
snow_origin.x = player.x + 1000 - random(2000);
snow_origin.y = player.y + 1000 - random(2000);
snow_origin.z = player.z + 300;
effect(snow_particles, 1, snow_origin.x, normal);
i += 1;
}
if(random(1) > 0.7)
{
c_move (player, nullvector, vector((-1 + random(1)) * time_step, 0, 0), IGNORE_PASSABLE | GLIDE);
}
wait (1);
}
}
function snow_particles(PARTICLE *p)
{
VECTOR particle_direction;
particle_direction.x = random(5) - 15;
particle_direction.y = (1 - random(2)) / 10;
particle_direction.z = -5 - random(7);
vec_add(p.vel_x, particle_direction); //VEL_X is now vel_x
p.alpha = 30 + random(65);
// set(p,FLARE); // Changed to what?
p.bmap = snow_tga; //p.BMAP = snow_tga; Won't accept
p.size = 3; //SIZE nono
set(p,BRIGHT);
set(p,MOVE);
p.event = fade_snow; //FUNCTION nono
}
function fade_snow(PARTICLE *p)
{
p.alpha -= 1.2 * time_step;
if (p.alpha < 0) {p.lifespan = 0;} // LIFESpan nono
}
function snow_sound()
{
if (snow_on)
{
snow_handle = snd_loop(snow_wav, 50, 0);
}
else
{
snd_stop(snow_handle);
}
}
/////////////////////////////////////////////////////////////////////////////////////////////
function toggle_rain()
{
rain_on += 1;
rain_on %= 2;
VECTOR rain_origin; // var nono
var i;
while (!player) {wait (1);}
rain_sound();
while (rain_on)
{
i = 0;
while (i < 30) // that's a "while without wait" loop
{
rain_origin.x = player.x + 500 - random(1000);
rain_origin.y = player.y + 500 - random(1000);
rain_origin.z = player.z + 300;
ent_create(rain_tga, rain_origin.x, rain_sprites);
i += 1;
}
rain_origin.x = player.x + 100 - random(200);
rain_origin.y = player.y + 100 - random(200);
rain_origin.z = player.z + 500;
ent_create(rain_tga, rain_origin.x, rain_sprites);
wait (1);
}
}
function rain_sprites()
{
set(my,PASSABLE);
// set(my,ORIENTED); // ORIENTED nono default?
set(my,TRANSLUCENT); //migrate didn´t fetch TRANSPARENT/TRANSLUCENT
my.alpha = 20 + random(75);
// set(my,UNLIT); // remove the comment to increase the brightness of the rain sprites
my.ambient = 40 + random(60); //AMBIENT/ambient migrate didn´t fetch
set(my,BRIGHT);
while (my.alpha > 0)
{
if (c_content(my.x, 0) == 3) // X/x nono CONTENT_SOLID (3) this is depend on ABT/BSP select "Works only with BSP levels and the AABB collision system."
{
my.alpha = 0;
}
my.z -= (25 + random(30)) * time_step; // well Z/z when we are on it
wait (1);
}
ent_remove(my);
}
function rain_sound()
{
if (rain_on)
{
rain_handle = snd_loop(rain_wav, 50, 0);
}
else
{
snd_stop(rain_handle);
}
}
/////////////////////////////////////////////////////////////////////////////////////////////
function toggle_fog()
{
fog1_on += 1;
fog1_on %= 2;
if (fog1_on)
{
camera.fog_start = 10;
d3d_fogcolor1.red = 55;
d3d_fogcolor1.green = 55;
d3d_fogcolor1.blue = 55;
fog_color = 1;
while (fog1_on)
{
camera.fog_end = 1000 + 400 * sin(0.5 * total_frames/20); // We'll put it like this: A7/Lite-C is 20 times faster than A6 in this case ;-)
wait (1);
}
}
else
{
fog_color = 0;
}
}
/////////////////////////////////////////////////////////////////////////////////////////////
ENTITY* fading_ent = {
type = "fader.mdl";
layer = 10;
alpha = 0;
pan = 90;
flags = (TRANSLUCENT | VISIBLE); // () for multi set, and TRANSPARENT/TRANSLUCENT
view = camera;
x = 250; // 250 quants ahead of the view
y = 0;
z = 0;
}
function toggle_daynight()
{
day += 1;
day %= 2;
if (day)
{
while (day)
{
camera.ambient = minv(100, camera.ambient + 1 * time_step); // overlayd bla.. must use minv/maxv compile complain
fading_ent.alpha = maxv(0, fading_ent.alpha - 1 * time_step);
wait (1);
}
}
else // night
{
while (!day)
{
camera.ambient = maxv(-100, camera.ambient - 1 * time_step);
fading_ent.alpha = minv(70, fading_ent.alpha + 1 * time_step);
wait (1);
}
}
}
/////////////////////////////////////////////////////////////////////////////////////////////
function main(){
// Moved stuff according to migration rules
fps_max = 60;
video_mode = 7; // 800x600 pixels
video_depth = 32; // 32 bit mode
video_screen = 1; // start in full screen mode
d3d_lightres = ON;
level_load (work40_wmb);
wait(-2);
on_s = toggle_snow;
on_r = toggle_rain;
on_f = toggle_fog;
on_d = toggle_daynight;
while (1) { // Silly one, just stay here
wait(1);
}
}