Hallo
Ich hab da ne frage zu partikeln.
Zählen Partikel, die ich generiere gegen das Entity Limit?
Ich habe da folgendes problem:
Ich schieße eine rakete ab, welche Rauchpartikel emmitiert, um ihren weg kurzzeitig verfolgen zu können. allerdings "stockt" der rauch nach einer gewissen zeit, also die Rakete bläst keinen rauch mehr raus, und kurz danach kommt der rauch wieder. Damit hab ich ein häliches loch in dem rauch, und das gefällt mir nicht.
Falls dem so ist, gibts ne alternative zu Partikeln, um den rauch darzustellen?
Ich habe hier mal den code für den rauch, bzw alles was mit dem rauch zu tun hat:
function fade_smoke()
{
my.alpha -= 1 * time_step;
if (my.alpha <= 0)
{
my.lifespan = 0;
}
}
function rocket_smoke_behavior()
{
my.bmap = pcxSmokeParticel;
my.TRANSPARENT = on;
my.alpha = 40;
my.lifespan = 80;
my.flare = on;
my.size = 3;
my.gravity = 0.01;
my.move = on;
my.function = fade_smoke;
}
function rocket_smoke()
{
var velocity;
while (1)
{
velocity.x = (0.1 -random(0.4));
velocity.y = (0.1 -random(0.4));
velocity.z = (0.1 -random(0.4));
effect(rocket_smoke_behavior,1, my.x, velocity);
wait (1);
}
}
function move_rockets()
{
var bullet_speed[3];
var rocket_spirale[3];
var var_rocket_rotation_y;
var var_rocket_rotation_z;
var var_rotation_radius;
var_rocket_rotation_y = 0;
var_rocket_rotation_z = 0;
var_rotation_radius = 2;
wait(1); // wait 1 frame after creation
vec_set(my.min_x,vector(1,0.2,-0.2));// Vektor for bounding box Minimum
vec_set(my.max_x,vector(10,0.1,0.1));// Vektor for Bounding box maximum
my.fat = on;
my.narrow = on;
bullet_speed.x = 10 * time_step; // Rocket Speed forward
bullet_speed.y = 0; // the Rocket doesn't move sideways
bullet_speed.z = 0; // or up / down on the z axis
my.ENABLE_IMPACT = ON;// make sensitive for entities hitting me
my.ENABLE_ENTITY = ON;// make sensitiv for entities
my.ENABLE_BLOCK = ON; // make sensitiv for level blocks
my.event = remove_bullets;// call funktion remove bullets if i hit something
my.pan = bullet_pan;//pan of rocket direktion
while (my)// as long as rocket exists
{
rocket_smoke();//call function rocket smoke and emitt smoke partikle
if (var_rocket_rotation_y < 360)//if else branche for rotation values for spiral movement
{
var_rocket_rotation_y += 10;
}
else
{
var_rocket_rotation_y = 0;
}
if (var_rocket_rotation_z < 360)
{
var_rocket_rotation_z += 10;
}
else
{
var_rocket_rotation_z = 0;
}
rocket_spirale.x = 0;
rocket_spirale.y = fsin(var_rocket_rotation_y,var_rotation_radius)* time_step;//calculation of y position of rocket in spiral
rocket_spirale.z = fcos(var_rocket_rotation_z,var_rotation_radius)* time_step;// calculation of z position of rocket in spiral
c_move (my, bullet_speed, rocket_spirale, IGNORE_YOU);//move the rocket
ent_sendnow(my);// send rocket datas
wait (1);
}
}
Wäre sehr dankbar für hilfe.
Ich nutze noch A6 Commercial.