particles

Posted By: sheefo

particles - 02/17/07 10:29

Are particles supported in the Lite-C beta? I am having so much trouble with them.
They are all just black lines originating from the centre of the level, and they never fade. I noticed they need the VISIBLE flag to be included to show (unlike in C-Script).

Anyway, custom particles do not work for me, but the ‘draw_line3d’ function seems to work fine, so the engine is capable of rendering particles properly. What’s the problem with custom particles then? Anyone have the same problem?
Posted By: jcl

Re: particles - 02/17/07 16:54

Particles are a little different than in C-Script. See:

http://manual.conitec.net/aent-effect.htm
Posted By: sheefo

Re: particles - 02/17/07 18:24

I know, I defined them properly for Lite-C. The problem is with that there is no bmap on the particles and they are black. They all start from the centre of the level and go to wherever you tell it to start.

Why do they do this?
Posted By: jcl

Re: particles - 02/19/07 16:54

How could I know that? I'd need your code for telling you what's wrong. Have you tried the example in the manual?
Posted By: sheefo

Re: particles - 02/20/07 17:39

I've tested it with the one in the manaul. Surely that should work.

It has no bmap and the position is weird.
Posted By: jcl

Re: particles - 02/20/07 17:51

The manual example was taken from working code, so it should also work. Can you send your project to the support? I'll have to look into it. Maybe there's a bug that only occurs under some circumstance.
Posted By: D3D

Re: particles - 02/22/07 08:28

In the Lite-C Manual Particle effect sample there is error? p.flags |= BRIGHT | MOVE;

Code:
// particle function: generates a fading explosion into vel direction
// particle function: generates a fading explosion into vel direction
function effect_explo(PARTICLE *p)
{
var temp[3];
vec_randomize(temp,10);
vec_add (p.vel_x, temp);
p.alpha = 25 + random(25);
p.bmap = scatter_map;
p.flags |= BRIGHT | MOVE;
p.event = part_alphafade; // change to a shorter, faster function
}


Oh and why is it that when you have myfile.c and myfile.wdl in the same folder and you edit the myfile.c in Lite-C SED and you set the myfile.c to be executed, it actualy executes myfile.wdl in both debug as well as test-run?

What I mean is twice the same name, but different extensions. You say in the manual how to rewrite from c-script -> lite-c code, to drop the code into an empty .c file. Only if it has the same name Lite-C SED will execute the .wdl first..


Posted By: jcl

Re: particles - 02/22/07 17:33

The ' |= ' sets additional flags without resetting the already-set flags. Alternatively, you could also write

set(p,BRIGHT | MOVE);

After you've migrated a function from .wdl to .c, you must of course erase the original function from the .wdl file! Otherwise it is compiled twice, once in C-Script and once in lite-C. If a WDL file exists that has the same name as the C file, it's executed first because lite-C needs its project settings, like PATH etc. See manual:

http://manual.conitec.net/litec_migration.htm
Posted By: D3D

Re: particles - 02/22/07 18:28

Thank you for clearing that up
© 2023 lite-C Forums