This is my code for the rain particle using easy particle system, but once i generate it and test run using the program..all i get is a black screen.. what is the problem? does it have anything to do with Vista?
void rain_effects(PARTICLE* p)
{
bmap rainBmap = <cloud.tga>;
VAR rainAnzahlPartikel = 1.607; //number of particles used for this effect
function rain_spec_fun()
{
if(my.size > 0) { my.size -= -0.100 *time; }else{my.lifespan = 0; }
my.alpha -= 0 *time;
IF(My.alpha < 0) { my.alpha = 0; my.lifespan = 0; }
my.skill_b += 0.03;
my.skill_c = 6 - my.skill_b;
if(my.skill_c < 0) { my.lifespan = 0; }
}
function rainspezial()
{
my.blue = 128 ;
my.green = 128 ;
my.red = 128 ;
my.skill_c = 0; my.skill_b = 0;
my.bmap = rainBmap; //the effect bitmap
my.vel_x = random( 0 ) - 0 ;
my.vel_y = random( 0 ) - 0 ;
my.vel_z = -40 ;
my.size = 1 ;
my.alpha = 100 ;
my.x += random(1000)-500;
my.y += random(1000)-500;
my.z += random(100)-50;
my.gravity = 0.598 ;
my.streak = on;
my.flare = on;
my.bright = on;
my.beam = off;
my.move = on;
my.transparent = on;
my.function = rain_spec_fun;
}
function rain()
{
while(1)
{
rainAnzahlPartikel = max(1,random(1));
var myPos[3];
vec_set(myPOS,camera.x);
temp.x = COS(camera.pan);
temp.y = SIN(camera.pan);
temp.Z = 600*COS(camera.tilt);
MyPos.X = myPos.X + temp.Z*temp.X;
MyPos.Y = myPos.Y + temp.Z*temp.Y;;
MyPos.Z = myPos.Z + 600*SIN(camera.TILT);
MyPos.Z = Camera.Z + 800;
effect(rainspezial,max(1,int(rainAnzahlPartikel*time)),MyPOS,nullvector);
wait(1);
}
}
action rain_action
{
my.invisible = on;
My.passable = on;
while(!key_r) { wait(1); }
rain();
}
}
Last edited by ToyLetBowl; 02/02/09 07:12.