Trying to make touch on touch off particle script
|
|
Maiomika Nemeth
Registered User
Join date: 23 Apr 2007
Posts: 13
|
10-04-2007 17:37
hola hello! i am working in a particle script that i can touch on and touch off inside a prim. at the moment i am trying to add the particle script to the touch on off script i took out of anoyher script (i am very new at this, this is the first script i am working on and so i do not understand how to add the funtion to have the script go on and off. this is the script. at the end it is doubled because i cannot figure out what to keep and what to get rid of to make it work it keeps giving me errors: list ParticleList = [0,371,1,<1.000000, 1.000000, 1.000000>,2,0.850000,3,<1.000000, 1.000000, 1.000000>,4,0.000000,5,<0.050000, 0.400000, 0.050000>,6,<0.030000, 1.200000, 0.030000>,7,0.900000,8,<0.000000, 0.000000, 0.000000>,9,2,13,0.110000,15,8,16,0.150000,17,0.050000,18,0.900000,19,0.000000,20,"llGetKey()",21,<0.000000, 10.000000, 0.000000>,22,0.540000,23,3.550000];default{ state_entry() { integer i = llListFindList(ParticleList,[20])+1; string str = llList2String(ParticleList,i); key k = llGetKey(); if (str != "llGetKey"  k = (key)str; ParticleList = llListReplaceList(ParticleList,[k],i,i);llParticleSystem(ParticleList); } } default { state_entry() { running=TRUE; llSetText("Running", <0.0, 1.0, 0.0>, 0.5); setParticles(); } touch_start(integer num_detected) { if (running==TRUE) { running=FALSE; llSetText("Stopped", <1.0, 0.0, 0.0>, 0.5); llParticleSystem([]); } else { running=TRUE; llSetText("Running", <0.0, 1.0, 0.0>, 0.5); setParticles(); } } } i thank you all for reading this, and for any help you can give. i am going to go back to trying to figure this out , all the best to you all.
|
|
Flennan Roffo
Scripter
Join date: 29 Sep 2007
Posts: 26
|
10-04-2007 18:20
From: Maiomika Nemeth hola hello! i am working in a particle script that i can touch on and touch off inside a prim. at the moment i am trying to add the particle script to the touch on off script i took out of anoyher script (i am very new at this, this is the first script i am working on and so i do not understand how to add the funtion to have the script go on and off. this is the script. at the end it is doubled because i cannot figure out what to keep and what to get rid of to make it work it keeps giving me errors: list ParticleList = [0,371,1,<1.000000, 1.000000, 1.000000>,2,0.850000,3,<1.000000, 1.000000, 1.000000>,4,0.000000,5,<0.050000, 0.400000, 0.050000>,6,<0.030000, 1.200000, 0.030000>,7,0.900000,8,<0.000000, 0.000000, 0.000000>,9,2,13,0.110000,15,8,16,0.150000,17,0.050000,18,0.900000,19,0.000000,20,"llGetKey()",21,<0.000000, 10.000000, 0.000000>,22,0.540000,23,3.550000];default{ state_entry() { integer i = llListFindList(ParticleList,[20])+1; string str = llList2String(ParticleList,i); key k = llGetKey(); if (str != "llGetKey"  k = (key)str; ParticleList = llListReplaceList(ParticleList,[k],i,i);llParticleSystem(ParticleList); } } default { state_entry() { running=TRUE; llSetText("Running", <0.0, 1.0, 0.0>, 0.5); setParticles(); } touch_start(integer num_detected) { if (running==TRUE) { running=FALSE; llSetText("Stopped", <1.0, 0.0, 0.0>, 0.5); llParticleSystem([]); } else { running=TRUE; llSetText("Running", <0.0, 1.0, 0.0>, 0.5); setParticles(); } } } i thank you all for reading this, and for any help you can give. i am going to go back to trying to figure this out , all the best to you all. Yeah. We went thru all that. Ever heard of editors? They can do amazing tricks when used properly, like making a script readable Btw. you can not define the default (or any other state) twice.
_____________________
Logic Scripted Products and Script Services Peacock Park (187,228,69)
*** Get your free copy of SL Mail today! ***
|
|
Maiomika Nemeth
Registered User
Join date: 23 Apr 2007
Posts: 13
|
10-04-2007 18:30
heloo sir, thank you for your responce. i am very new at scripting as i was saying, and if you really cannot help then there is no need to write, to belitte me. i am simply trying, as you may have been when you first started too. weather or not i know of an editor (i edit right from the script) it is not a very kind way to treat someone who simply wants to know. i see now how acedemics makes us into people who simply think ourselves better then anyone who doesnt have our knowledge, but sir, true knowledge is one that does not belittle anyone, or make anyone better or less then. and if you would use any knowledge like that,m then i see that you are not getting the chance to really use knowledge in a way that would make you and anyone happy, and i am sorry for that. well, it is no problum if you cannot help, i really just needed nudgeing and a little understanding, i am dealing with words and ways to do things that i have not known before. i thank you for taking your time to help, and i wish yo u the very best. now, back to figureing this thing out! ^_^ all the best to you.
|
|
Jesse Barnett
500,000 scoville units
Join date: 21 May 2006
Posts: 4,160
|
10-04-2007 18:43
I am going to take a quick shower and then I'll take a look at your script. Either I or someone here in the scripting forum will get it up and running for you. Welcome to the world of scripting 
_____________________
I (who is a she not a he) reserve the right to exercise selective comprehension of the OP's question at anytime. From: someone I am still around, just no longer here. See you across the aisle. Hope LL burns in hell for archiving this forum
|
|
Maiomika Nemeth
Registered User
Join date: 23 Apr 2007
Posts: 13
|
10-04-2007 18:51
thanks alot Jesse, any tips would be wonderful! 
|
|
Jesse Barnett
500,000 scoville units
Join date: 21 May 2006
Posts: 4,160
|
10-04-2007 19:50
This works and will give you something to build off of: //This list is from the wiki: //"This will make an explosion of red particles, which follow the wind and glow"
integer running = TRUE; list ParticleList = [PSYS_PART_FLAGS, PSYS_PART_WIND_MASK, PSYS_PART_EMISSIVE_MASK,PSYS_SRC_PATTERN, PSYS_SRC_PATTERN_EXPLODE, PSYS_PART_START_COLOR, <1,0,0>];
default { state_entry() { llSetText("Stopped", <0.0, 1.0, 0.0>, 0.5); llParticleSystem([]); } touch_start(integer num_detected) { if (running==TRUE) { running=FALSE; llSetText("Running", <1.0, 0.0, 0.0>, 0.5); llParticleSystem([ParticleList]); } else { running=TRUE; llSetText("Stopped", <0.0, 1.0, 0.0>, 0.5); llParticleSystem([]); } } }
Since you are just learning then the best thing to do would be to download LSEditor, an excellent tool for beginners: http://www.lsleditor.org/Download.aspxAlphonse had worked extremely hard making this for everyone. You can script and save them in windows instead of LL and also can check them to see if they are right and can even run them. One other really useful part is that it makes the code here much easier to read. If you will install it and then come back here and copy all of my script and paste it into LSLEditor. Then go to Edit/Advanced and click "Format Document". It will automatically indent the script and you can see the flow of the script much easier. As you learn more then I would highly suggest downloading Scite-EZ and install LSLint into it. It is much more powerful and accurate(But I still use LSLEditor along with it). It will also help to read the stickies at the top of this forum and of course keep your nose buried in the wiki. Over time you will discover that these 3 forums here; Scripting Tips, Building Tips & Texturing Tips are unlike any forums you have ever been in. Many people have been checking in day after day and year after year helping new people learn new skills. As we learn then some of us start to do the same. Please don't be shy and ask plenty of questions just as most of us did. There are no dumb questions, just some dumb responses sometimes  . EDIT: OMG, I am so bad! Left off Animation Tips!!!! My deepest apologies to the animation crowd!!!!!
_____________________
I (who is a she not a he) reserve the right to exercise selective comprehension of the OP's question at anytime. From: someone I am still around, just no longer here. See you across the aisle. Hope LL burns in hell for archiving this forum
|
|
Maiomika Nemeth
Registered User
Join date: 23 Apr 2007
Posts: 13
|
10-04-2007 20:05
so much information in that post! it was very hellpful and needed. i did not know they had scripting editors i will be downloading that and checking the script you game me, and tinkering and learning. thank you very much for your help and your responce, i was a little worried to ask before for help because i have seen people mistreated for asking questions others knew, which is a shame because were all learning , it is really great to be able to get help from people who know scripting, i thank you for your time and your help and tips, i'm going to be using all of them as i learn, and anything else i can pick up as i go along. i wish you and your family the best of health, and hope youi all have a good day.
|