Jump to content

Swimmie Chaffe

Resident
  • Posts

    34
  • Joined

  • Last visited

Everything posted by Swimmie Chaffe

  1. Hi, I have used almost identical notecard reader codes in another project, and it was working fine in that setting. But when I used them, they are not working. In the first llOwnerSay (llOwnerSay(": "+data);), it returns lines in the NC, so it is reading something...but then in llOwnerSay in the end, two strings return as "unknown" (llOwnerSay("This board is for: " + avatar_rpname + " and the avatar key is "+ avatar_keyid);). The NC simply states: Character Name=Swimmie Key=2a7c9edd-bd0e-44ce-82ca-e9c18e38dc5f in separate lines. I'd appreciate if anyone can help me fixing this. Thank you in advance! Swimmie // Codes below// //Notecard reader variables integer VERBOSE = TRUE; integer NoteLine; integer gLN; key NoteKey; string notecard_name = "Avatar"; string avatar_rpname; string avatar_keyid; default { on_rez(integer start_param) { llResetScript(); } changed(integer change) { if(change & CHANGED_INVENTORY) llResetScript(); } state_entry() { avatar_rpname="unknown"; avatar_keyid="unknown"; NoteLine = 0; gLN = 0; if( ~llGetInventoryType(notecard_name) ) { NoteKey = llGetNotecardLine(notecard_name, NoteLine); } else { llOwnerSay("Notecard '"+notecard_name+"' was not found in inventory."); } } dataserver(key QueryID, string data) { if (QueryID == NoteKey) { if (data != EOF) { gLN++; if(VERBOSE) llOwnerSay(": "+data); if(data != "") // ignore blank lines { if(llGetSubString(data,0,0) != "#" ) // ignore comment { integer i = llSubStringIndex(data, "="); // if line contains equal sign if(i != -1) { // get name of name/value pair string name = llGetSubString(data, 0, i - 1); string value = llGetSubString(data, i + 1, -1); // trim name list temp = llParseString2List(name, [" "], []); name = llDumpList2String(temp, " "); // make name lowercase (case insensitive) name = llToLower(name); // trim value temp = llParseString2List(value, [" "], []); value = llDumpList2String(temp, " "); // name if(name == "Character Name") avatar_rpname=value; // key else if(name == "Key") avatar_keyid=value; } } } NoteLine ++; NoteKey = llGetNotecardLine(notecard_name, NoteLine); } else //the end of the NC { llOwnerSay("This board is for: " + avatar_rpname + " and the avatar key is "+ avatar_keyid); } } } }
  2. P.S... >>Further more, don't use "" here: PSYS_SRC_TEXTURE, (key)"random_texture". What would you suggest me to use here instead?
  3. Hi Darkie, Thanks for your prompt reply and willingness to help. I can see my script contains multiple issues (errors + wasteful codes), but I am still not sure how I can fix my script so that it would randomly pick a texture from the list. I moved the entire ramdomization effect part under "timer", but the script is still not picking up textures... Any suggestions? Swimmie
  4. Hi, I am trying to write a particle script with random textures (with a UUID list, not textures in the prim inventory) in the simplist way. This is my attempt, but my script is not picking up textures :-( I'd appreciate if anyone could help identifying and fixing errors in this script. Thanks in advance for your help! P.S. Is it possible to randomize textures without using timer? If so, how? //A set of textures list textures = [ "ad90ac58-6e23-afbc-1f4f-6adbfd78b5b5", "dcab6cc4-172f-e30d-b1d0-f558446f20d4", "bb08ed92-9f0e-85d8-2eaf-9f67b7795e3d" ]; default { state_entry() { //Randomize Textures integer number_of_textures = llGetListLength(textures); integer random_texture_index = (integer) llFrand(number_of_textures); string random_texture = ""; random_texture = llList2String(textures, random_texture_index); llSetTimerEvent(0.1); } timer() { //Start Particle llParticleSystem([ PSYS_PART_FLAGS , 0 | PSYS_PART_INTERP_COLOR_MASK | PSYS_PART_INTERP_SCALE_MASK | PSYS_PART_FOLLOW_VELOCITY_MASK | PSYS_PART_EMISSIVE_MASK, PSYS_SRC_PATTERN, 8, PSYS_SRC_TEXTURE, (key)"random_texture", PSYS_SRC_MAX_AGE, 0.000000, PSYS_PART_MAX_AGE, 1.000000, PSYS_SRC_BURST_RATE, 0.010000, PSYS_SRC_BURST_PART_COUNT, 4, PSYS_SRC_BURST_RADIUS, 2.000000, PSYS_SRC_ACCEL, <0.00000, 0.00000, 0.00000>, PSYS_SRC_BURST_SPEED_MIN, 1.000000, PSYS_SRC_BURST_SPEED_MAX, 0.000000, PSYS_PART_START_COLOR, <1.00000, 1.00000, 1.00000>, PSYS_PART_END_COLOR, <1.00000, 1.00000, 1.00000>, PSYS_PART_START_ALPHA, 0.000000, PSYS_PART_END_ALPHA, 1.000000, PSYS_PART_START_SCALE, <0.5, 0.5, 0.5>, PSYS_PART_END_SCALE, <0.5, 0.5, 0.5>, PSYS_SRC_ANGLE_BEGIN, 1.625000, PSYS_SRC_ANGLE_END, 1.625000, PSYS_SRC_OMEGA, <0.00000, 0.00000, 0.00000>]); } }
  5. I asked a couple of Lindens to create an official LL fundraising vendor through which the sales can be directly donated to the fund, but no reply. I am donating all sales from my inworld store during March to Linden Bear and know others doing the same, but more direct way to put L together will be better. There are many who are willing to help, but are scattering around and ppl who donate must want to know the money goes to where it is supposed to be. I think Linden official vendor will assure the credibility, and allow individual merchants to participate easily.
  6. Hi Kim, I dropped NCs to you and Donation Linden. I would like it if you could make/endorse an official vendor that allows creators donate proceeds from their creation directly to the fund. I made the vendor myself and included in the notecard, in case it can be any use, but I am a novice scripter. If you are going to do that, I'd volunteer to translate English instruction to Japanese, so that it is easier for Japanese creators (and we have many wonderful ones!) to participate. I hope you could take a look at them and respond. Thanks for your efforts to raise the fund to help victims of Earthquake. I was born and raised in Japan and my family and friends are still there, some are in the area that is deeply affected by the quake. I'd be glad if I could do something to help a long and painful process of recovery, in RL and in SL.
×
×
  • Create New...