Problem mit Partikel Flags / Problem with Particle

Posted By: TheTommynator

Problem mit Partikel Flags / Problem with Particle - 06/29/07 19:59

First the german version:

Hi @all,

mir machen im Moment die Partikel-Flags Probleme.

Zuerst der Code:
Code:
 function effect_explo(PARTICLE *p)
{
var temp[3];
vec_randomize(temp,10);
vec_add (p.vel_x, temp);
p.alpha = 25 + random(25);
p.flags |= BRIGHT | MOVE;
p.event = part_alphafade; // change to a shorter, faster function
}



Wenn ich den ausführe, erhalte ich von der Engine folgende Fehlermeldung:
Quote:

Error in 'MAIN' line 26: syntax error
< p.flags |= BRIGHT | MOVE; >




Dabei hatte ich das Beispiel aus dem Handbuch kopiert.

Schreibe ich die Zeile so:

Code:
 p.flags |= MOVE; 



funktioniert es.

Hat jemand eine Idee, woran das liegen könnte?

Now the English version:

I'm having some problem with the particle-flags right now.

First of all the code:
Code:
 function effect_explo(PARTICLE *p)
{
var temp[3];
vec_randomize(temp,10);
vec_add (p.vel_x, temp);
p.alpha = 25 + random(25);
p.flags |= BRIGHT | MOVE;
p.event = part_alphafade; // change to a shorter, faster function
}



If I execute this piece of code I get the following error message:
Quote:

Error in 'MAIN' line 26: syntax error
< p.flags |= BRIGHT | MOVE; >



But this is an example copied from the manual.

If I write the line like this:
Code:
 p.flags |= MOVE; 


it works.

Has anybody got an idea about this?

Thanks / Danke
TheTommynator
Posted By: Poison

Re: Problem mit Partikel Flags / Problem with Particle - 06/29/07 20:16

versuch mal anstatt bei den flags das bright und move zu starten es mit
my.bright = on
und
my.move = on
es wird bestimmt klappen
Posted By: TheTommynator

Re: Problem mit Partikel Flags / Problem with Part - 06/29/07 20:27

Quote:

Error in 'MAIN' line 26: 'move': is not a Member of 'PARTICLE'
< p.move = on; >




Geht nicht
Posted By: Poison

Re: Problem mit Partikel Flags / Problem with Part - 06/29/07 21:26

versuch es nicht mit p.move sondern mit my.move
Posted By: Rich

Re: Problem mit Partikel Flags / Problem with Part - 06/30/07 01:47

I'm not sure why that way is not working (I haven't tried) but try:

set(p, MOVE | BRIGHT);

worked for me.


EDIT:
Just tried it and I found the following solution:

try changing

p.flags |= BRIGHT | MOVE;

to

p.flags |= (BRIGHT | MOVE);


© 2024 lite-C Forums