/////////////////////////////////untitled.c/////////////////////////////////
//
//Generated by Parted by Martin Coumont (redphoenix)
//
//LiteC Script file from 15.03.2013 ; 17:49:09:
//
//////////////////////////////////////////////////////////////////////////////
/////////////////////////////////header/////////////////////////////////
#ifndef PARTED_VECTOR_DEF
#define PARTED_VECTOR_DEF
VECTOR* parted_temp_vec = { x=0;y=0;z=0; }
VECTOR* parted_temp2_vec = { x=0;y=0;z=0; }
ANGLE* parted_temp_ang = { pan=0;tilt=0;roll=0; }
#endif
#ifndef fire3_DEF
#define fire3_DEF
BMAP* fire3_map = "fire3.tga";
#endif
/////////////////////////////////particle code/////////////////////////////////
function Base_Effect_base(PARTICLE* p) {
p.size = 4.000;
p.alpha = 100.000;
p.red = 128;
p.green = 128;
p.blue = 128;
p.skill_c = 0.5;
p.vel_x = random(2.000)+(-1.000);
p.vel_y = random(2.000)+(-1.000);
p.vel_z = (3.000);
p.lifespan = 40.000;
p.gravity = 0.000;
p.flags = BRIGHT | TRANSLUCENT | MOVE;
p.skill_x = p.vel_x;
p.skill_y = p.vel_y;
p.skill_z = p.vel_z;
p.event = NULL;
}
function New_child1_child_event(PARTICLE* p) {
p.alpha = clamp(p.alpha-5.000* time_step,-1,100);
p.size -= 500* time_step; //war mal 1.000
if(p.alpha < 0 || p.size < 0) p.lifespan = 0;
}
function New_child1_child(PARTICLE* p) {
p.size = 14.000;
p.alpha = 100.000;
p.red = 113;
p.green = 36;
p.blue = 0;
p.skill_c = 0.5;
p.vel_x = random(2.000)+(-1.000);
p.vel_y = random(2.000)+(-1.000);
p.vel_z = (3.000);
p.lifespan = 40.000;
p.gravity = 0.000;
p.flags = BRIGHT | TRANSLUCENT | MOVE;
p.skill_x = p.vel_x;
p.skill_y = p.vel_y;
p.skill_z = p.vel_z;
p.event = New_child1_child_event;
}
function New_child_child_event(PARTICLE* p) {
p.size += 2.000* time_step;
p.alpha = clamp(p.alpha-3.000* time_step,-1,100);
if(p.alpha < 0 || p.size < 0) p.lifespan = 0;
}
function New_child_child(PARTICLE* p) {
p.size = 10.000; //war mal 20.000
p.alpha = random(45.555)+(22.445);
p.red = 120;
p.green = 120;
p.blue = 120;
p.skill_c = 0.5;
p.vel_x = random(1.000)+(-0.500);
p.vel_y = random(1.000)+(-0.500);
p.vel_z = random(1.117)+(0.883);
p.lifespan = 40.000;
p.gravity = 0.000;
p.flags = TRANSLUCENT | MOVE;
p.skill_x = p.vel_x;
p.skill_y = p.vel_y;
p.skill_z = p.vel_z;
p.event = New_child_child_event;
}
function Base_Effect2_base_event(PARTICLE* p) {
if(p.alpha <= 2.000) {
parted_temp_vec.x = 0.000;
parted_temp_vec.y = 0.000;
parted_temp_vec.z = 0.000;
vec_add(parted_temp_vec,p.x);
if(!(total_frames % 6)) {
p.skill_c += 1.000*time_step*6.25;
if(p.skill_c >= 1){
effect(New_child1_child,integer(p.skill_c),parted_temp_vec,nullvector);
p.skill_c -= integer(p.skill_c);
}
}
}
if(p.alpha <= 2.000) {
parted_temp_vec.x = 0.000;
parted_temp_vec.y = 0.000;
parted_temp_vec.z = 0.000;
vec_add(parted_temp_vec,p.x);
if(!(total_frames % 5)) {
p.skill_c += 1.000*time_step*6.25;
if(p.skill_c >= 1){
effect(New_child_child,integer(p.skill_c),parted_temp_vec,nullvector);
p.skill_c -= integer(p.skill_c);
}
}
}
p.size += 0.399* time_step;
if(p.lifespan <= 32.000 || (p.skill_a & 2)) {
p.skill_a |= 2;
p.alpha = clamp(p.alpha-4.000* time_step,-1,100);
}
if(p.alpha < 0 || p.size < 0) p.lifespan = 0;
}
function Base_Effect2_base(PARTICLE* p) {
p.size = random(1.000)+(1.252); //(1.748)+(3.252);
p.alpha = random(27.535)+(25.465);
p.red = 255;
p.green = 128;
p.blue = 64;
p.skill_c = 0.5;
p.vel_x = random(0.287)+(0.013);
p.vel_y = random(0.281)+(0.019);
p.vel_z = random(1.246)+(1.153);
p.lifespan = 50.000;
p.gravity = 0.000;
p.bmap = fire3_map;
p.flags = BRIGHT | TRANSLUCENT | MOVE;
p.skill_x = p.vel_x;
p.skill_y = p.vel_y;
p.skill_z = p.vel_z;
p.event = Base_Effect2_base_event;
}
function New_effect_base_event(PARTICLE* p) {
p.size += 2.000* time_step;
p.alpha = clamp(p.alpha-3.000* time_step,-1,100);
if(p.alpha < 0 || p.size < 0) p.lifespan = 0;
}
function New_effect_base(PARTICLE* p) {
p.size = 8.000;
p.alpha = 52.000;
p.red = 77;
p.green = 136;
p.blue = 225;
p.skill_c = 0.5;
p.vel_x = random(0.199)+(-0.100);
p.vel_y = random(0.199)+(-0.100);
p.vel_z = random(0.781)+(0.618);
p.lifespan = 40.000;
p.gravity = 0.000;
p.flags = TRANSLUCENT | MOVE;
p.skill_x = p.vel_x;
p.skill_y = p.vel_y;
p.skill_z = p.vel_z;
p.event = New_effect_base_event;
}
/////////////////////////////////emitter actions/////////////////////////////////
action Base_Effect_emitter() {
var eff_frac; eff_frac = 0;
wait(1);
while(my) {
parted_temp_vec.x = 0.000;
parted_temp_vec.y = 0.000;
parted_temp_vec.z = 0.000;
vec_add(parted_temp_vec,my.x);
eff_frac += 1.000*time_step*6.25;
if(eff_frac >= 1){
effect(Base_Effect_base,integer(eff_frac),parted_temp_vec,nullvector);
eff_frac -= integer(eff_frac);
}
wait(1);
}
}
action fire() {
var eff_frac; eff_frac = 0;
wait(1);
while(my) {
parted_temp_vec.x = random(10.000)+-5.000;
parted_temp_vec.y = random(10.000)+-5.000;
parted_temp_vec.z = random(0.000)+0.000;
vec_add(parted_temp_vec,my.x);
if(!(total_frames % 2)) {
eff_frac += 2.000*time_step*6.25;
if(eff_frac >= 1){
effect(Base_Effect2_base,integer(eff_frac),parted_temp_vec,nullvector);
eff_frac -= integer(eff_frac);
}
}
parted_temp_vec.x = random(10.000)+-5.000;
parted_temp_vec.y = random(10.000)+-5.000;
parted_temp_vec.z = random(0.000)+0.000;
vec_add(parted_temp_vec,my.x);
if(!(total_frames % 8)) {
eff_frac += 1.000*time_step*6.25;
if(eff_frac >= 1){
effect(New_effect_base,integer(eff_frac),parted_temp_vec,nullvector);
eff_frac -= integer(eff_frac);
}
}
wait(1);
}
}
/////////////////////////////////creation/////////////////////////////////
function untitled_create(VECTOR* position) {
if(!position)position = nullvector;
wait(3);
you = ent_create(NULL,position,Base_Effect_emitter);
if(you) {
vec_add(you.x,vector(0.000,0.000,0.000));
vec_set(you.pan,vector(0.000,0.000,0.000));
vec_set(you.scale_x,vector(500,500,500)); //(1.000,1.000,1.000));
set(you,PASSABLE);
set(you,INVISIBLE);
}
you = ent_create(NULL,position,fire);
if(you) {
vec_add(you.x,vector(28.613,28.613,0.000));
vec_set(you.pan,vector(0.000,0.000,0.000));
vec_set(you.scale_x,vector(500,500,500)); //(1.000,1.000,1.000));
set(you,PASSABLE);
set(you,INVISIBLE);
}
}