02-19-2013, 02:08 AM
What is it?
This is something I’ve made to help scripters & non-scripters alike. It will read the particle parameters from a notecard you select. You can load literally hundreds & hundreds of notecards, building a large library of particle effects. All a user has to do is copy a notecard & then change some of the values listed.. Select your new notecard from the dialog menu & presto, you can view your newly made particle effect. I’ve tried to make the script so it’s easily edit0red into another system:)
How-to/Info:
•Copy paste the ‘script’ below into a new script inworld.
•Copy paste the ‘notecard’ below into a new notecard inworld.
•Save them & then put them into an object (if not there already).
•Touch it.
From the script you can redefine the name of the default notecard, for me its set to *Default Particles*. Once you are sure you have the notecard name matching the name in the script, you can begin making some custom effects.
This is something I’ve made to help scripters & non-scripters alike. It will read the particle parameters from a notecard you select. You can load literally hundreds & hundreds of notecards, building a large library of particle effects. All a user has to do is copy a notecard & then change some of the values listed.. Select your new notecard from the dialog menu & presto, you can view your newly made particle effect. I’ve tried to make the script so it’s easily edit0red into another system:)
How-to/Info:
•Copy paste the ‘script’ below into a new script inworld.
•Copy paste the ‘notecard’ below into a new notecard inworld.
•Save them & then put them into an object (if not there already).
•Touch it.
From the script you can redefine the name of the default notecard, for me its set to *Default Particles*. Once you are sure you have the notecard name matching the name in the script, you can begin making some custom effects.
PHP Code:
//Do not sell this; Karma knowz where you live ☠
// Made to read particle params from notecards, allowing storage of more effects in an active object.
Help(){
llOwnerSay("/me :: Custom Editing Instructions ::
This tools aim is; To easily edit new particle effects & build up a collection of notecard configurations. Each being able to have the params posted cleanly into chat privately for usage in other scripts or projects. The menu system is set to allow any number of notecards (hundreds & hundreds;) I suggest you name the start of the notecard with a name, so it fits on the menu button.
The notecard named \"Default Particles\" should be found in this prims inventory. I've added lots of comments hoping to make it a little easier to remember which does what.. Read the comments in the notecard for direct info on how to edit the notecard into your own custom made particle effects.
TIP; Less comments in the notecard = the faster it will load, keep the default notecard full of comments but try to remove them from your custom made notecards/parameters.\n");
llSleep(llGetRegionTimeDilation()+0.04);//make sure the ownersay below doesn't show up before the above~.. it happens.
llOwnerSay("/me :: Editing The Notecard ::
Once you have edited a notecard you can simply drop it into this prim, if its not here already. Once in the prim you can select \"Notecards\" from the menu then select your effect; After a short load time (shorter = less comments) the particle effect will start. If it doesn't start then its highly possible you've put in some odd values, rendering the particles invisible for eg. Check them ;) To list the parameters without the comments select \"Spam ON\" from the menu options. This will make pasting into a script much easier.
Thats about it, read the notecard comments, build up a nice collection; share with friends your notecard configs etc =]
If you're new to particles & would like to know more; Visit Jopsy Pendragon's \"The Particle Laboratory\" for comprehensive help/info.");
}
//
key Owner;//see state_entry
integer dMenu = 0;//counter
integer Parts;//parts
list List;//inventory list
integer dChannel;//menu channel
integer dHandle;//handle for inventory menu listen
integer Type = INVENTORY_NOTECARD;//make sure inv menu pulls up notecards only from the inventory
integer loopSound = FALSE;//default value for the looped sound effect
float soundVolume = 1.0;//for sound functions
key soundEffect ="cc385f87-8248-df57-ad04-40813444d540";//default sound effect; triggered once when particles start
key soundLooped = "0671e204-d976-fcc7-f907-a5010546e7b8";//default loop sound effect, lopping until stopped
float MenuTimer = 60;//how long to keep menus/listen active
//
integer nLine;//notecard line number
key queryID = NULL_KEY;//key id for data event
string Notecard = "*Default Particles*";//name of our notecard//default particle effect
integer spam = FALSE;//Set to TRUE if you want params said to chat
integer UpdateOnChange = FALSE;//read notecard (if TRUE) when inventory changes
list MenuButtons = ["•","Notecards","•","•OFF•","•RESET•","•HELP•","Spam ON","•","Spam OFF","INVU ON","•","INVU OFF"];
mainMenu(){
llListenRemove(dHandle);
llSetTimerEvent(MenuTimer);
dHandle = llListen(dChannel, "", "", "");
string spammage;
string invUpdate;
if(spam)spammage = "ON";
else spammage = "OFF";
if(UpdateOnChange)invUpdate = "ON";
else invUpdate = "OFF";
llDialog(Owner, "
Inv Update = "+invUpdate+"
Spam Params = "+spammage+"
•Help = Post privately some help on custom effects.
•INVU = Inventory Update, this set to ON will result in the particles being updated when you hit \"Save\" on a particle 'notecard'.
•Spam = Toggle the option to post in chat the particle parameters from the notecard selected.
•Notecards = List the notecards currently loaded (near limitless capacity;)
•OFF = Stop/Turn off all particle effects.
•RESET = Reset the core script.", MenuButtons, dChannel);
}
Load(){integer i;
Parts=0;
List = [];
for(i=0; i<= -1 + llGetInventoryNumber(Type);i++){
List += [llGetInventoryName(Type,i)];
Parts++;
}
}
invMenu(){
llSetTimerEvent(MenuTimer);
list Menu;
integer i;
Menu = [];
if(dMenu > 0)
Menu += ["<<Back"];
else
Menu += ["<<<<"];
Menu += ["-Main-"];
if(dMenu*8+8 < Parts - 1)
Menu += ["Next>>"];
else
Menu += [" "];
for(i=dMenu*8; (i <= dMenu*8+8) && (i <= Parts - 1);i++){
Menu += [llGetSubString(llGetInventoryName(Type, i),0,23)];
}
llDialog(Owner, "\n*Select desired particle effect;", Menu, dChannel);
}
string Name2full(string str1){
integer u=0;
for(;u<llGetInventoryNumber(Type);u++){
if(llGetSubString(llGetInventoryName(Type,u),0,23)==str1)//33..
return llGetInventoryName(Type,u);
}
return "";
}
// Default Particle Params
integer pFlags;
integer running = TRUE;
string texture;
vector startSize;
vector endSize;
vector startColor;
vector endColor;
float startAlpha;
float endAlpha;
float particleAge;
float systemAge;
float burstRate;
integer burstCount;
float radius;
float angleStart;
float angleEnd;
vector omega;
float minSpeed;
float maxSpeed;
vector acceleration;
key target;
integer glowEffect;
integer colorInterpolation;
integer sizeInterpolation;
integer followVelocity;
integer windEffect;
integer bounceEffect;
integer followSource;
//Uncomment the following selections once they've been implemented
//integer randomAcceleration;
//integer randomVelocity;
//integer particleTrails;
integer pattern;
Particles(){pFlags = 0;
if (colorInterpolation) pFlags = pFlags|PSYS_PART_INTERP_COLOR_MASK;
if (sizeInterpolation) pFlags = pFlags|PSYS_PART_INTERP_SCALE_MASK;
if (windEffect) pFlags = pFlags|PSYS_PART_WIND_MASK;
if (bounceEffect) pFlags = pFlags|PSYS_PART_BOUNCE_MASK;
if (followSource) pFlags = pFlags|PSYS_PART_FOLLOW_SRC_MASK;
if (followVelocity) pFlags = pFlags|PSYS_PART_FOLLOW_VELOCITY_MASK;
if (target!=NULL_KEY) pFlags = pFlags|PSYS_PART_TARGET_POS_MASK;
if (glowEffect) pFlags = pFlags|PSYS_PART_EMISSIVE_MASK;
//Uncomment the following selections once they've been implemented
//if (randomAcceleration) pFlags = pFlags|PSYS_PART_RANDOM_ACCEL_MASK;
//if (randomVelocity) pFlags = pFlags|PSYS_PART_RANDOM_VEL_MASK;
//if (particleTrails) pFlags = pFlags|PSYS_PART_TRAIL_MASK;
llParticleSystem([
PSYS_PART_FLAGS, pFlags,
PSYS_SRC_PATTERN, pattern,
PSYS_PART_START_COLOR, startColor,
PSYS_PART_END_COLOR, endColor,
PSYS_PART_START_ALPHA, startAlpha,
PSYS_PART_END_ALPHA, endAlpha,
PSYS_PART_START_SCALE, startSize,
PSYS_PART_END_SCALE, endSize,
PSYS_PART_MAX_AGE, particleAge,
PSYS_SRC_ACCEL, acceleration,
PSYS_SRC_TEXTURE, texture,
PSYS_SRC_BURST_RATE, burstRate,
PSYS_SRC_ANGLE_BEGIN, angleStart,
PSYS_SRC_ANGLE_END, angleEnd,
PSYS_SRC_BURST_PART_COUNT, burstCount,
PSYS_SRC_BURST_RADIUS, radius,
PSYS_SRC_BURST_SPEED_MIN, minSpeed,
PSYS_SRC_BURST_SPEED_MAX, maxSpeed,
PSYS_SRC_MAX_AGE, systemAge,
PSYS_SRC_TARGET_KEY, target,
PSYS_SRC_OMEGA, omega ]);
}
//send request to dataserver
ReadNotecard(string n){
//Memory(llGetFreeMemory());
nLine = 0;
llOwnerSay("/me >> Reading particle parameters from notecard \"" + n + "\". Please wait;");
if(spam)llOwnerSay("/me //Start; Particle parameters.");
queryID = llGetNotecardLine(Notecard, nLine);
}
//check memory Memory(llGetFreeMemory());
Memory(integer mem){
llOwnerSay("/me >> "+(string)mem + " of free memory available `0'");
}
//check if a key is valid
integer isKey(key in){
if(in) return 2;
return (in == NULL_KEY);
}
// check to make sure notecard exists
list dList;
list InventoryList(){integer i;
list result = [];
integer n = llGetInventoryNumber(INVENTORY_NOTECARD);
for( i = 0; i < n; i++ ){result += [llGetInventoryName(INVENTORY_NOTECARD, i)];
}
return result;
}
//
StopEffects(){
llStopSound();
llParticleSystem([]);
}
default{
state_entry(){
Owner = llGetOwner();
Load();//load inventory
dChannel = (integer)llFrand(DEBUG_CHANNEL) * -1;
StopEffects();
llOwnerSay("/me >> Script successfully Reset;");
//llOwnerSay((string)llGetLinkNumber());
}
//
touch_start(integer total_number){
if(llDetectedKey(0) != Owner)return;//Only work for set user
mainMenu();//open menu
// Some effects for button;
integer touchedFace = llDetectedTouchFace(0);
vector oldColor = llGetColor(touchedFace);// Store away the original color
llSetColor(<0., 255., 0.>, touchedFace);// Flash color
llSleep(0.04);
llSetColor(oldColor, touchedFace);// Put the color back to how we found it.
}
//
timer(){//remove lag/listen & stop timer
llSetTimerEvent(0.0);
llListenRemove(dHandle);
}
//
listen(integer chan, string who, key id, string msg){//we listen for responses from menu
//llOwnerSay((string)chan+", "+who+", "+(string)id+", "+msg);
if(chan == dChannel){
if(msg == "<<<<"){
dMenu=0;
mainMenu();
}else if(msg == "Notecards"){
invMenu();
}else if(msg == "•OFF•"){
StopEffects();
}else if(msg == "•HELP•"){
Help();
}else if(msg == "•RESET•"){
llResetScript();
}else if(msg == "Spam ON"){spam = TRUE;
llOwnerSay("/me >> Spam ON; The particle parameters will now be posted privately into chat.
(This is helpful when copy-pasting params into another script/project)");
}else if(msg == "Spam OFF"){spam = FALSE;
llOwnerSay("/me >> Spam OFF;");
}else if(msg == "INVU ON"){UpdateOnChange = TRUE;
llOwnerSay("/me >> Inventory Update ON; When you save a notecard it will update the current particle system.
(This is helpful when editing notecards to see the changes quickly, keep it off for day-2-day usage)");
}else if(msg == "INVU OFF"){UpdateOnChange = FALSE;
llOwnerSay("/me >> Inventory Update OFF;");
}else if(msg == "<<Back"){
dMenu--;
invMenu();
}else if(msg == "-Main-"){
dMenu=0;
invMenu();
}else if(msg == "Next>>"){
dMenu++;
invMenu();
}else if(llListFindList(List,[Name2full(msg)])!=-1){
Notecard = Name2full(msg);
ReadNotecard(Notecard);
}
}
}
//
dataserver(key qid, string data){
if (qid == queryID){
if (data != EOF){
//llOwnerSay((string)(nLine + 1) + ". Read: " + data);
// search the "=" sign and take the rest of the text
integer nEqualPos = llSubStringIndex(data, "=");
if (nEqualPos != -1){
// before
string Entry = llGetSubString(data, 0, nEqualPos - 1);
// after
string Value = llGetSubString(data, nEqualPos + 1, -1);
if (Entry == "target"){// Target
if(Value == "NULL_KEY"||Value == "target="){target = NULL_KEY;
if(spam) llOwnerSay("/me key target = \"" + (string)target + "\";");
}else if(Value == "llGetKey()"){target = llGetKey();
if(spam) llOwnerSay("/me target = \"" + (string)target + "\";");
}else if(Value == "llGetOwner()"){target = llGetOwner();
if(spam) llOwnerSay("/me target = \"" + (string)target + "\";");
}else{target = (key)Value;
if(spam) llOwnerSay("/me key target = \"" + (string)target + "\";");
}
}
else if (Entry == "texture"){// Texture
integer result = isKey(Value);
if(result){texture = (key)Value;
if(spam)llOwnerSay("/me key texture = \"" + (string)texture + "\";");
}else{
if(Value == "texture="||Value == "NULL_KEY"){texture = NULL_KEY;
if(spam)llOwnerSay("/me key texture = \"" + Value + "\";");
}else{
llOwnerSay("/me >> texture ERROR; You did not enter a valid texture key; You tried to input "+Value);
}
}
}
else if (Entry == "startSize"){// Start size
vector v = (vector)Value;
if(v.x > 4.0 || v.y > 4.0 || v.z > 4.0){
llOwnerSay("/me >> startSize ERROR; You did not enter a valid vector; Maximum size is 4.0m.. You tried to input "+Value);
}if(v.x < 0.0 || v.y < 0.0 || v.z < 0.0){
llOwnerSay("/me >> startSize ERROR; You did not enter a valid vector; Minimum size is 0.0m.. You tried to input "+Value);
}else{startSize = (vector)Value;
if(spam)llOwnerSay("/me vector startSize = " + (string)startSize + ";");
}
}else if (Entry == "endSize"){// End size
vector v = (vector)Value;
if(v.x > 4.0 || v.y > 4.0 || v.z > 4.0){
llOwnerSay("/me >> endSize ERROR; You did not enter a valid vector; Maximum size is 4.0m.. You tried to input "+Value);
}if(v.x < 0.0 || v.y < 0.0 || v.z < 0.0){
llOwnerSay("/me >> endSize ERROR; You did not enter a valid vector; Minimum size is 0.0m.. You tried to input "+Value);
}else{endSize = (vector)Value;
if(spam)llOwnerSay("/me vector endSize = " + (string)endSize + ";");
}
}else if (Entry == "startColor"){// Start Color
vector v = (vector)Value;
if(v.x > 1.0 || v.y > 1.0 || v.z > 1.0){
llOwnerSay("/me >> startColor ERROR; You did not enter a valid color vector; Maximum value is from 0 to 1.. You tried to input "+Value);
}if(v.x < 0.0 || v.y < 0.0 || v.z < 0.0){
llOwnerSay("/me >> startColor ERROR; You did not enter a valid color vector; Minimum value is from 0 to 1.. You tried to input "+Value);
}else{startColor = (vector)Value;
if(spam)llOwnerSay("/me vector startColor = " + (string)startColor + ";");
}
}else if (Entry == "endColor"){//End color
vector v = (vector)Value;
if(v.x > 1.0 || v.y > 1.0 || v.z > 1.0){
llOwnerSay("/me >> endColor ERROR; You did not enter a valid color vector; Maximum value is from 0 to 1.. You tried to input "+Value);
}if(v.x < 0.0 || v.y < 0.0 || v.z < 0.0){
llOwnerSay("/me >> endColor ERROR; You did not enter a valid color vector; Minimum value is from 0 to 1.. You tried to input "+Value);
}else{endColor = (vector)Value;
if(spam)llOwnerSay("/me vector endColor = " + (string)endColor + ";");
}
}else if (Entry == "startAlpha"){// Start alpha
if((float)Value > 1.0){
llOwnerSay("/me >> startAlpha ERROR; The values we can set for alpha = from 0.00 (invisible) to 1.00 (visible); You tried to input value "+Value);
}else if((float)Value < 0.0){
llOwnerSay("/me >> startAlpha ERROR; The values we can set for alpha = from 0.00 (invisible) to 1.00 (visible); You tried to input value "+Value);
}else{
startAlpha = (float)Value;
if(spam)llOwnerSay("/me float startAlpha = " + (string)startAlpha+ ";");
}
}else if (Entry == "endAlpha"){// End alpha
if((float)Value > 1.0){
llOwnerSay("/me >> endAlpha ERROR; The values we can set for alpha = from 0.00 (invisible) to 1.00 (visible); You tried to input value "+Value);
}else if((float)Value < 0.0){
llOwnerSay("/me >> endAlpha ERROR; The values we can set for alpha = from 0.00 (invisible) to 1.00 (visible); You tried to input value "+Value);
}else{//we have a valid value, so we'll set it
endAlpha = (float)Value;
if(spam)llOwnerSay("/me float endAlpha = " + (string)endAlpha + ";");
}
}else if (Entry == "particleAge"){// Particle age
if((float)Value > 30.0){
llOwnerSay("/me >> particleAge ERROR; Maximum age for particle age is 30 seconds; You tried to input value "+Value);
}else if((float)Value < 0.0){
llOwnerSay("/me >> particleAge ERROR; Minimum age for particle age is 0 seconds; You tried to input value "+Value);
}else{//we have a valid value, so we'll set it
particleAge = (float)Value;
if(spam)llOwnerSay("/me float particleAge = " + (string)particleAge + ";");
}
}else if (Entry == "systemAge"){// System Age
if((float)Value < 0.0){
llOwnerSay("/me >> systemLife ERROR; Minimum system age is 0 seconds(set to 0 for endless/infinite); You tried to input value "+Value);
}else{systemAge = (float)Value;
if(spam)llOwnerSay("/me float systemAge = " + (string)systemAge + ";");
}
}else if (Entry == "burstRate"){// Burst Rate
if((float)Value < 0.0){
llOwnerSay("/me >> burstRate ERROR; Minimum burst rate is 0 seconds(set to 0 for fastest possible emission rate); You tried to input value "+Value);
}else{burstRate = (float)Value;
if(spam)llOwnerSay("/me float burstRate = " + (string)burstRate + ";");
}
}else if (Entry == "burstCount"){// Burst Count
if((float)Value > 1000){
llOwnerSay("/me >> burstCount ERROR; Setting burst count too high can result in lag material, its not suggested you go much over 1000; You tried to input value "+Value+" (tip; small clouds etc 100 to 200)");
}else{burstCount = (integer)Value;
if(spam)llOwnerSay("/me integer burstCount = " + (string)burstCount + ";");
}
}else if (Entry == "radius"){// Radius
if((float)Value < 0.0 || (float)Value > 50.0){
llOwnerSay("/me >> radius ERROR; Maximum radius is believed to be 50m; You tried to input value "+Value);
}else{radius = (float)Value;
if(spam)llOwnerSay("/me float radius = " + (string)radius + ";");
}
}else if (Entry == "angleStart"){// Angle Start
angleStart = (float)Value;
if(spam)llOwnerSay("/me float angleStart = " + Value + ";");
}else if (Entry == "angleEnd"){// Angle End
angleEnd = (float)Value;
if(spam)llOwnerSay("/me float angleEnd = " + Value + ";");
}else if (Entry == "minSpeed"){// Min Speed
minSpeed = (float)Value;
if(spam)llOwnerSay("/me float minSpeed = " + Value + ";");
}else if (Entry == "maxSpeed"){// Max Speed
maxSpeed = (float)Value;
if(spam)llOwnerSay("/me float maxSpeed = " + Value + ";");
}else if (Entry == "omega"){// Omega
omega = (vector)Value;
if(spam)llOwnerSay("/me vector omega = " + Value + ";");
}else if (Entry == "acceleration"){// Accel / Push
acceleration = (vector)Value;
if(spam)llOwnerSay("/me vector acceleration = " + Value + ";");
}// TRUE / FALSE conditions
else if (Entry == "glowEffect"){// Glow Effect
if(Value == "TRUE"){glowEffect = TRUE;
}else if(Value == "FALSE"){glowEffect = FALSE;
}else{
llOwnerSay("/me >> glowEffect ERROR; You can only have a TRUE or FALSE setting; You tried to input value "+Value);
}
if(spam)llOwnerSay("/me integer glowEffect = " + Value + ";");
}else if (Entry == "colorInterpolation"){// Color interpol
if(Value == "TRUE"){colorInterpolation = TRUE;
}else if(Value == "FALSE"){colorInterpolation = FALSE;
}else{
llOwnerSay("/me >> colorInterpolation ERROR; You can only have a TRUE or FALSE setting; You tried to input value "+Value);
}
if(spam)llOwnerSay("/me integer colorInterpolation = " + Value + ";");
}else if (Entry == "sizeInterpolation"){// Size interpol
if(Value == "TRUE"){sizeInterpolation = TRUE;
}else if(Value == "FALSE"){sizeInterpolation = FALSE;
}else{
llOwnerSay("/me >> sizeInterpolation ERROR; You can only have a TRUE or FALSE setting; You tried to input value "+Value);
}
if(spam)llOwnerSay("/me integer sizeInterpolation = " + Value + ";");
}else if (Entry == "followVelocity"){// Follow Vel
if(Value == "TRUE"){followVelocity = TRUE;
}else if(Value == "FALSE"){followVelocity = FALSE;
}else{
llOwnerSay("/me >> followVelocity ERROR; You can only have a TRUE or FALSE setting; You tried to input value "+Value);
}
if(spam)llOwnerSay("/me integer followVelocity = " + Value + ";");
}else if (Entry == "windEffect"){// Wind effect
if(Value == "TRUE"){windEffect = TRUE;
}else if(Value == "FALSE"){windEffect = FALSE;
}else{
llOwnerSay("/me >> windEffect ERROR; You can only have a TRUE or FALSE setting; You tried to input value "+Value);
}
if(spam)llOwnerSay("/me integer windEffect = " + Value + ";");
}else if (Entry == "bounceEffect"){// Bounce effect
if(Value == "TRUE"){bounceEffect = TRUE;
}else if(Value == "FALSE"){bounceEffect = FALSE;
}else{
llOwnerSay("/me >> bounceEffect ERROR; You can only have a TRUE or FALSE setting; You tried to input value "+Value);
}
if(spam)llOwnerSay("/me integer bounceEffect = " + Value + ";");
}else if (Entry == "followSource"){// Follow source
if(Value == "TRUE"){followSource = TRUE;
}else if(Value == "FALSE"){followSource = FALSE;
}else{
llOwnerSay("/me >> followSource ERROR; You can only have a TRUE or FALSE setting; You tried to input value "+Value);
}
if(spam)llOwnerSay("/me integer followSource = " + Value + ";");
}else if (Entry == "pattern"){// Pattern
if(Value == "PSYS_SRC_PATTERN_EXPLODE"){pattern = 0x02;}
else if(Value == "PSYS_SRC_PATTERN_DROP"){pattern = 0x01;}
else if(Value == "PSYS_SRC_PATTERN_ANGLE_CONE"){pattern = 0x08;}
else if(Value == "PSYS_SRC_PATTERN_ANGLE"){pattern = 0x04;}
else if(Value == "PSYS_SRC_PATTERN_ANGLE_CONE_EMPTY"){pattern = 0x10;}
else{
llOwnerSay("/me >> pattern ERROR; You can only have the following parameters
PSYS_SRC_PATTERN_EXPLODE
PSYS_SRC_PATTERN_DROP
PSYS_SRC_PATTERN_ANGLE_CONE
PSYS_SRC_PATTERN_ANGLE
PSYS_SRC_PATTERN_ANGLE_CONE_EMPTY
You tried to input value "+Value+".");
}
if(spam)llOwnerSay("/me integer pattern = " + Value + ";");
}
//Uncomment the following selections once they've been implemented
//else if (Entry == "randomVelocity"){
//if(Value == "TRUE"){randomVelocity = TRUE;
//}else{randomVelocity = FALSE;}
//if(spam)llOwnerSay("/me integer randomVelocity = " + Value + ";");
//}
//else if (Entry == "randomAcceleration"){
//if(Value == "TRUE"){randomAcceleration = TRUE;
//}else{randomAcceleration = FALSE;}
//if(spam)llOwnerSay("/me integer randomAcceleration = " + Value + ";");
//}
//else if (Entry == "particleTrails"){
//if(Value == "TRUE"){particleTrails = TRUE;
//}else{particleTrails = FALSE;}
//if(spam)llOwnerSay("/me integer particleTrails = " + Value + ";");
//}
// Other effects
else if (Entry == "loopSound"){
if(Value == "TRUE"){loopSound = TRUE;
}else if(Value == "FALSE"){loopSound = FALSE;
}else{
llOwnerSay("/me >> loopSound ERROR; You can only have a TRUE or FALSE setting; You tried to input value "+Value);
}
if(spam)llOwnerSay("/me integer loopSound = " + Value + ";");
}else if (Entry == "soundEffect"){
integer result = isKey(Value);
if(result){soundEffect = (key)Value;
if(spam)llOwnerSay("/me key soundEffect = \"" + Value + "\";");
}else{
llOwnerSay("/me >> soundEffect ERROR; You did not enter a valid sound key; You tried to input "+Value);
}
}else if (Entry == "soundLooped"){
integer result = isKey(Value);
if(result){soundLooped = (key)Value;
if(spam)llOwnerSay("/me key soundLooped = \"" + Value + "\";");
}else{
llOwnerSay("/me >> soundLooped ERROR; You did not enter a valid sound key; You tried to input "+Value);
}
}else if (Entry == "soundVolume"){
if((float)Value > 1.0){
llOwnerSay("/me >> soundVolume ERROR; The values we can set for volume = from 0.00 (silent) to 1.00 (loud); You tried to input value "+Value);
}else if((float)Value < 0.0){
llOwnerSay("/me >> soundVolume ERROR; The values we can set for volume = from 0.00 (silent) to 1.00 (loud); You tried to input value "+Value);
}else{soundVolume = (float)Value;
if(spam)llOwnerSay("/me float soundVolume = " + (string)soundVolume + ";");
}
}
// Example of reading a list(ed) entry
// listExample = red,5,TRUE,NULL_KEY
//else if (Entry == "listExample"){
//list l = llCSV2List(Value);
//integer i;
//for (i = 0; i < llGetListLength(l); i++){
//if(spam)llOwnerSay("list " + (string)i + " = " + llList2String(l, i));
//}
//}
}
++nLine;
queryID = llGetNotecardLine(Notecard, nLine);
}else{// all done.. reset our particle params with our new settings
if(spam)llOwnerSay("/me //End");
StopEffects();
Particles();
llTriggerSound(soundEffect,soundVolume);
if(loopSound)llLoopSound(soundLooped,soundVolume);
llOwnerSay("/me >> New particle parameters set;");
}
}
}
//
changed(integer change){
if(change & CHANGED_OWNER){llResetScript();
}
if(change & CHANGED_INVENTORY){
Load();//we reload inventory menu list to show new changes
if(!UpdateOnChange) return;
dList = InventoryList();//update our list
if(llListFindList(dList,[Notecard])!=-1){//check our notecard is still in there, prevent error if deleting
ReadNotecard(Notecard);//notecard found, read it
}else{//we didnt find the notecard that was last set, maybe we changed it's name
llOwnerSay("/me >> INVUpdating failed; Parameters have not been changed; \""+Notecard+"\" was not found.
(Notecard deleted or name of the notecard has changed)");
}
}
}
//
}