Jump to content

revochen Mayne

Resident
  • Posts

    208
  • Joined

  • Last visited

Everything posted by revochen Mayne

  1. Thats odd. I replaced the notecard and now its working without any code changes. The previous notecard had a different creator but full permissions though. And it DIDNT work befor, i have my chat log as evidence. :matte-motes-nerdy:
  2. Greetings! I'm trying to set a prims light by a config notecard which contains mulitple lines for the light parameters. One of the lines sais: color = <1,0,0> The prim is containing a script which will start reading the config notecard on touch and sets the light parameters when the notecard reading process finished (EOF). But i figured that typecasting a string to vector doesn't work as expected somehow although i know it has to, did it so often in the past. Why it's not working now? óò Thats the code out of the dataserver event: (The original code contains further else if statements for any light parameter) dataserver(key request, string data) { if(request==notecard_request) { if(data!=EOF) { list data_split = llParseString2List(data,["="],[]); string left = llToLower( llStringTrim(llList2String(data_split,0),STRING_TRIM)); string right = llStringTrim(llList2String(data_split,1),STRING_TRIM); if(left=="color") { color = (vector)right; llOwnerSay((string)color+" "+right); // results in <0,0,0> <1,0,0> } ++notecard_line; notecard_request = llGetNotecardLine(notecard_name,notecard_line); } else { llSetPrimitiveParams([PRIM_POINT_LIGHT,1,color,10,1,1]); } } } I was also trying several options like having the vector elements as floats, with and without spaces between but it seems to be the typecast as the "right" variable does get the proper vector. Also color = llList2Vector(data_split,1);and color = (vector)llList2String(data_split,1); doesnt work! Any idea whats wrong?
  3. Yes, i know. Just had to mention it as the TS seems to want to show any avatar name within a region as menu option. At least thats what his recent topic was about here.
  4. I'm not sure if it's the reason for your problem but your http_response event is missing a request verification.
  5. Only seems to work for a menu with 12 or less buttons though. :matte-motes-nerdy:
  6. Hello contyy The "list order_buttons ( list buttons )" rather looks like a global function named "order_buttons" with a list "buttons" as function parameter which also returns a list variable. According to the function name (order_buttons) it will order a list of buttons and return its result.
  7. I may think of a few possible conflicts if the object won't be owned by yourself. What if its on no scripted land? Or just taken into inventory. Not sure what the object is about in detail though.
  8. Hello steph! Receiving emails is a bit tricky to handle because the script always needs call the llGetNextEmail function first in order to receive new emails within its email event. Other than that its rather easy to get though.
  9. SoniaStrummFan wrote: For scripts, it doesn't need to have anything terribly flashy, just basic things: engine on/off, seat position adjuster, lights on/off, exhaust, standard manual speed (like a 4 or 6-speed gearbox), and if possible, a resizing script for the car. Just basic car scripts, you know? If thats what you call basic, what would be the advanced version? The only thing i may think of missing is particles, or did you just forgot about?
  10. yes, thats a great idea! he could even move it by using the control keys! :matte-motes-nerdy: but i just guess he doesnt want to go that far and rather having a human chess than a scripted chess?
  11. Just for your info, the slice feature seems to work by script now. At least there is a PRIM_SLICE constant relating to the llSetLinkPrimitiveParams now. :smileylol: And yes, its working. Just had to use it in a script a few days ago. :smileytongue:
  12. The llSetCamerParams function requires a CAMERA_FOCUS vector parameter which the camera has to view at. The CAMERA_FOCUS_LOCKED parameter within the same function then requires a TRUE or FALSE value and will result in either a locked focus position if set to TRUE or a attached/moving view (it will follow the avatars movement and rotation then), which seems to be the case at the TS chess game currently. The particle idea rather sounds like a bad one. It will result in having multiple emitters, creating new particles every 30 seconds or less, as thats the max lifetime of a particle, according to the LSL wiki. Also dont forget about the particle count settings, which is a viewer setting at its preferences and might be set to very low count, or even particle feature being disabled.
  13. Greetings! 1) Yes, by using the CAMERA_FOCUS_LOCKED flag within the llSetCameraParams function maybe? 2) They are separate objects, not linked? That might requires external object to object communication at least to get the board key (UUID) and using it in a llGetObjectDetails function to get its rotation by using the OBJECT_ROT parameter.
  14. I'm sorry for asking again but... what? Oô It just doesnt makes sense to let the script reset in a state_entry event as its the start (entry) point for each script. Usually non of the following functions after a ResetScript gets executed. The following code (usually has to) result in infinite looping the state_entry event without the Whipser("after reset") executing: default{ state_entry() { llWhisper(0,"befor reset"); llResetScript(); llWhisper(0,"after reset"); }} Edit: I did a test and got a loop with the "befor reset" chat message like 100 times. Then the script stucked, running box is still checked but im not able to get it recompiled by reset or simply saving it. Also a shift copy will result in a broken script somehow. Disclaimer: If you experience any inconvenience on your sim - It wasn't me (i hope)!
  15. Cerise script will work. You need to type cast the string elements into integer types.
  16. Orito Wonder wrote: Thank you for the reply. The code now looks like this... string payTemp;default{ state_entry() { llResetScript(); llSetClickAction(CLICK_ACTION_TOUCH); llSetPayPrice(PAY_HIDE,[]); payTemp = "25|50|75|100"; } touch(integer num_detected) { llSetPayPrice(PAY_DEFAULT,llParseString2List(payTemp,["|"],[","])); } money(key giver, integer amount) { }} However, the problem persists. Thanks again. You seriously want to reset the script in a state_entry event? What's the reason for to do so?
  17. You need to touch it at least once to get your custom pay options, did you? And just noticed you need to remove the "," at: llSetPayPrice(PAY_DEFAULT,llParseString2List(payTemp,["|"],[","])); Because the list elements are comma separated by system and the SetPayPrice function in your state_entry event is empty which will result in showing the default options. Example using llParseString2List: string yourOptions = "1|2|3|4"; list parsedOptions = llParseString2List(yourOptions,["|"], [ ] ); // go on using your parsedOptions list
  18. Madelaine McMasters wrote: Rolig Loon wrote: It's another name for a tachometer. It measures (or pretends to show) engine speed. Where I come from a "rev-meter" is the version control system that tells everybody else that it takes me 10x more edits to get my code working than for them. That's why I cut the red wire. Honestly, thats what i thought too!
  19. I'm not much experienced if it comes to vehicles, but.... PeterCanessa Oh wrote: rev-meter ...made me curious. What is it for?
  20. Greetings! I almost tend to keep scripts separated and modulary, dependng on its purpose and figured its good to do so on complex system. So i have a script for the menu, another for the vehicle including user input, maybe another for shared functions like float text, sound or particles and so on. That way you will have a few small scripts with less code instead of one single script with hundred lines of code, duzends of events and maybe also a few different states (which is quite annoying when you have a timer and need it to handle different tasks). I also figured that those scripts may run smoother, especially if you need to run different tasks simultanously and LSL doesnt support multi-threading as its a procedural programming language. Just think about sending an email via llEmail which has a delay of 20 seconds and will freeze your script for that time. So no user input or other task may process then and it makes much sense to out-source this function into a separate script and use communication via llMessageLinked for data exchange if necessary.
  21. I made this game quite some time ago and remade it to fit actual scripting capabilities. Its rules are easy: Touch 2 nearby fruits and they will switch their positions. Try to get 3 or more matching fruits in a horizontal or vertical row. Time limit is 2 minutes. The game provides 4 different levels (easy, middle, hard and pro) and will optional show a top 10 highscore on my website. Its fun to play so dont wait at get your own fruits HUD available at the marketplace! Release offer! Only 20L$ until september 1st. https://marketplace.secondlife.com/p/Fruits-Game-HUD-14/5225086
  22. This script will handle different languages, set up by notecards and provides a user menu based on. The notecard setup is described below the following script code. /* Multi Language Script by revochen Mayne */ // global system variables integer listen_handler; integer menu_channel = -1000; list main_menu; key user = NULL_KEY; string language = "en"; list lang_params; list lang_values; key notecard_request; integer notecard_line; // handy method to get a language value by param string GetLang(string GL_param) { integer GL_index = llListFindList(lang_params,[GL_param]); if(GL_index!=-1) { return llList2String(lang_values,GL_index); } else return GL_param; } // handy method to set a language value by param SetLang(string SL_param, string SL_value) { integer SL_index = llListFindList(lang_params,[SL_param]); if(SL_index!=-1) { lang_values = llListReplaceList(lang_values,[SL_value],SL_index,SL_index); } } default { state_entry() { // initializing english language setup notecard_request = llGetNotecardLine("lang_"+language,notecard_line); } touch_start(integer total_number) { key who = llDetectedKey(0); if(user==NULL_KEY || who==user) // if menu is not in used or got requested again by 'user' { user = who; listen_handler = llListen(menu_channel,"",user,""); llDialog(user,"\n"+GetLang("MENU_DESC"),main_menu,menu_channel); llSetTimerEvent(30); } } listen(integer channel, string name, key id, string message) { llSetTimerEvent(0); llListenRemove(listen_handler); if(channel==menu_channel) { if(message==GetLang("AN_OPTION")) // menu user picked AN_OPTION { llSay(0,GetLang("OPTION_REPLY")); user = NULL_KEY; } else if(message==GetLang("SET_LANG")) // menu user picked SET_LANG { // gathering available languages by reading containing notecards: integer count = 0; integer max = llGetInventoryNumber(INVENTORY_NOTECARD); list lang_menu; while(count<max && count<12) { list split = llParseString2List(llGetInventoryName(INVENTORY_NOTECARD,count),["_"],[]); lang_menu += llList2String(split,-1); ++count; } listen_handler = llListen(menu_channel+1,"",id,""); llDialog(id,"\n"+GetLang("CHOOSE_LANG"),lang_menu,menu_channel+1); llSetTimerEvent(30); } } else if(channel==menu_channel+1) // user picked a new language { language = message; user = NULL_KEY; // initializing new language setup: lang_params = []; lang_values = []; notecard_line = 0; notecard_request = llGetNotecardLine("lang_"+language,notecard_line); } } timer() { llSetTimerEvent(0); llListenRemove(listen_handler); user=NULL_KEY; } dataserver(key request, string data) { if(request==notecard_request) { if(data!=EOF) // didn't reached EndOfFile yet { // parsing and processing notecard data list split = llParseString2List(data,["="],[]); if(llGetListLength(split)==2) { lang_params += llList2String(split,0); lang_values += llList2String(split,1); } ++notecard_line; notecard_request = llGetNotecardLine("lang_"+language,notecard_line); } else // finished reading notecard { main_menu = [GetLang("AN_OPTION"), GetLang("SET_LANG")]; // reassemble menu llSay(0, GetLang("CHANGE_COMPLETE")+" "+(string)llGetUsedMemory()+"bytes "+GetLang("MEM_USED")+"/"+(string)llGetFreeMemory()+"bytes "+GetLang("MEM_FREE")); } } } } /* http://hotfusion-sl.com*/ A language notecard name needs to start with "lang_" and ends with its short language name like "en" for english. Following parameters and values needs to get defined in: MENU_DESC=Please choose an option: AN_OPTION=Any Option OPTION_REPLY=This is just an example! SET_LANG=Set Language CHOOSE_LANG=Please choose a language: CHANGE_COMPLETE=Language change complete! MEM_FREE=memory free MEM_USED=memory used The script is very basic and only provides an option to change the language and another sample option. For any further use the script needs additional code especially for error handling if wanted (like no notecard including, menu buttons limited to 12, button label limited to 24 characters and so on). Any feedback and suggestion much appreciated. =)
  23. Hallo Bea! Da scheint etwas mit dem SSL-Zertifikat nicht zu stimmen, was fuer eine sichere Uebertragung benoetigt wird. Das kann allerdings viele Ursachen haben. Wenn wir ausschliessen, dass der Fehler auf SL-Seite liegt, kannst du nur mal probieren bei dir im Webbrowser das bisherige Zertifikat von SL manuell zu entfernen. Evtl ist bei dir noch ein altes Zertifikat hinterlegt, oder etwas anderes stimmt damit nicht, wodurch es zu der Fehlermeldung kommt. Bei mir (Opera) kann man das bei den Einstellungen / Datenschutz&Sicherheit machen. Bei Firefox wird es aehnlich sein. Die Firewall(?) von G-Data wuerde ich erstmal als Fehlerquelle ausschliessen, da du den Marktplatz ja als Ausnahme eingetragen hast. Falls meine Idee nicht geholfen hat, solltest du dich wohl doch bei LL mal melden. Hier auf den Seiten hast du aber wohl keine Probleme bisher?
  24. I'm searching for help on a game I'm creating. Following positions are vacant: Grafic Artists (2D/3D) You need to create buildings, vehicles or other type of content including its textures. Programmers (LSL/PHP/MySQL) You need to code buildings, vehicles and other type of content and link it to an external web server. Storyboard Writers (English/German) You need to write a storyboard and quests for the game but also write and maintain articles on a website. Please send me a notecard stating the preferred position, your salary expectation and references if available. Closing date is friday, 27th of july. Thank You! =)
×
×
  • Create New...