I have recently tried to make a fire particle effect,but the engine won't even start up because it says that parameter "size" is not a property of ENTITY*. The function that "me.size" is in is called by "effect();), though. Does anyone know what's the problem and how to fix it? Thanks in advance.
Here is the code, by the way:
BMAP* flame = "flame_1.bmp";
ENTITY* fire_spawner;
function flame_2()
{
my.skill_a += 6 * time_step;
my.alpha = 100 - abs(my.skill_a);
my.size -= 0.3 * time_step;// problem here
}
function flame_1()
{
my.x += random(16)-8;
my.y += random(16)-8;
my.z += random(16)-8;
my.bmap = flame;
my.size = random(20) +20;
my.lifespan = 32;
my.flare = on;
my.alpha = 0;
my.bright = on;
my.skill_a = -100;
my.gravity = -0.2;
my.move = on;
my.function = flame_2;
}
action fire()
{
fire_spawner = me;
my.passable = on;
my.invisible = on;
while(1){
effect(flame_1, 2 * time_step, my.x, nullvector);
wait(1);
}
}
function main(){
level_load("");
ent_create("basic_sphere.mdl",my.x,fire);
}