Jump to content
You are about to reply to a thread that has been inactive for 3144 days.

Please take a moment to consider if this thread is worth bumping.

Question

Posted

ive been trying to finish this darn thing for awhile it uses channel 2 to turn off and on the particles i made but its giving me a syntax error at the end near the last } , i couldve sworn i put in everything correct can i get some help with this guys.

 

default
{
state_entry()
{
llListen(2,"","","on");
llListen(2,"","","off");
}

listen(integer number, string name, key id, string message)
{
if(message=="on")
{
llParticleSystem([
PSYS_PART_FLAGS,
PSYS_PART_INTERP_COLOR_MASK|
PSYS_PART_INTERP_SCALE_MASK|
PSYS_PART_EMISSIVE_MASK|
PSYS_PART_FOLLOW_SRC_MASK|
PSYS_PART_FOLLOW_VELOCITY_MASK,

PSYS_SRC_PATTERN,
PSYS_SRC_PATTERN_ANGLE_CONE,

PSYS_PART_START_COLOR,<0.663, 0.039, 0.651>,
PSYS_PART_END_COLOR,<0.663, 0.039, 0.651>,

PSYS_PART_START_ALPHA,.6,
PSYS_PART_END_ALPHA,1,

PSYS_PART_START_SCALE,<0.5,0.5,FALSE>,
PSYS_PART_END_SCALE,<0.125,0.25,FALSE>,

PSYS_SRC_BURST_PART_COUNT,1,
PSYS_SRC_BURST_SPEED_MIN,.2,
PSYS_SRC_BURST_SPEED_MAX,.7,
PSYS_SRC_BURST_RATE,0.01,

PSYS_SRC_ANGLE_BEGIN, PI,
PSYS_SRC_ANGLE_END, PI,

PSYS_SRC_ACCEL,<0,0,0>,
PSYS_SRC_OMEGA,<0,0,0>,


PSYS_PART_MAX_AGE,1,
PSYS_SRC_MAX_AGE,0.0 ]);
}
{
if(message=="off")
{
llParticleSystem([]);
}
}

1 answer to this question

Recommended Posts

  • 0
Posted

Things like this are really obvious if you always remember to indent properly and then count your matching { brackets }.  Incidentally, there's no need for TWO llListen statements.  You're already filtering for "off" and "on" in the script, so the extra llListen is redundant.

default{    state_entry()    {        llListen(2,"","","");        // llListen(2,"","","off");  remove this    }    listen(integer number, string name, key id, string message)    {        if(message=="on")        {        llParticleSystem([        PSYS_PART_FLAGS,        PSYS_PART_INTERP_COLOR_MASK|        PSYS_PART_INTERP_SCALE_MASK|        PSYS_PART_EMISSIVE_MASK|        PSYS_PART_FOLLOW_SRC_MASK|        PSYS_PART_FOLLOW_VELOCITY_MASK,        PSYS_SRC_PATTERN,        PSYS_SRC_PATTERN_ANGLE_CONE,        PSYS_PART_START_COLOR,<0.663, 0.039, 0.651>,        PSYS_PART_END_COLOR,<0.663, 0.039, 0.651>,        PSYS_PART_START_ALPHA,.6,        PSYS_PART_END_ALPHA,1,        PSYS_PART_START_SCALE,<0.5,0.5,FALSE>,        PSYS_PART_END_SCALE,<0.125,0.25,FALSE>,        PSYS_SRC_BURST_PART_COUNT,1,        PSYS_SRC_BURST_SPEED_MIN,.2,        PSYS_SRC_BURST_SPEED_MAX,.7,        PSYS_SRC_BURST_RATE,0.01,        PSYS_SRC_ANGLE_BEGIN, PI,        PSYS_SRC_ANGLE_END, PI,        PSYS_SRC_ACCEL,<0,0,0>,        PSYS_SRC_OMEGA,<0,0,0>,        PSYS_PART_MAX_AGE,1,        PSYS_SRC_MAX_AGE,0.0 ]);        }        if(message=="off")        {        llParticleSystem([]);        }    }}

 

  • Like 3
You are about to reply to a thread that has been inactive for 3144 days.

Please take a moment to consider if this thread is worth bumping.

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
×
×
  • Create New...