Jump to content

Ron Khondji

Resident
  • Posts

    351
  • Joined

  • Last visited

Everything posted by Ron Khondji

  1. If there's no link_message event in a state then the script can not receive any linked messages while in that state. You need to have a link_message event in every state.
  2. llTargetOmega() is totaly viewer side if the object is not physical. So you can either make the object physical or use some other method to rotate it.. (I'm hoping someone else knows some other methods.)
  3. Maybe the one with problems has 'blocked' something or someone.
  4. I do not know the answer to your question. What I did notice was a very strange construction you use in your listen event. Instead of: string player = llGetDisplayName(llDetectedKey(0)); llSay(0, "/me " + "secondlife:///app/agent/" + (string) id + "/displayname rolled " + (string)roll + ", " + message); You could have done: string player = llGetDisplayName(id); llSay(0, "/me " + player + " rolled " + (string)roll + ", " + message); Because llDetectedKey() only works in touch and sensor events, and the key of the 'speaker' is allready available in the listen event.
  5. I had the same problem with my old alienware laptop with a gtx280m card. It ran quite stable with an old nvidia driver, 260.something I believe. Anything newer and Second Life kept crashing. So I suggest you get the latest official driver for your card from Dell instead of the latest nvidia drivers. Maybe it'll help.
  6. After finally having read what you are trying to do, or atleast what I think it is that you are trying to do, I have to ask this: why not keep it simple? Have 1 script to handle the attaching, checcking and 'touch interacting' stuff. Have another to do the animation stuff. And the last for the avatar communications. Use link messages to communicat between the scripts. Kinda like this is what I mean: Script 1 default { state_entry() { llRequestPermissions(llGetOwner(), PERMISSION_ATTACH); llSetTimerEvent(10.0); } run_time_permissions(integer perm) { llSetTimerEvent(.0); if (perm & PERMISSION_ATTACH) llAttachToAvatar(38); else llDie(); } attach(key id) { if (id) llMessageLinked(LINK_SET, 1, "ATTACHED", ""); else { llMessageLinked(LINK_SET, 1, "DETACHED", ""); llSetTimerEvent(5.0); } } touch_end(integer num) { llMessageLinked(LINK_SET, 1, "TOUCHED", ""); } timer() { llDie(); } on_rez(integer rez) { if (!llGetAttached()) llResetScript(); } } Script 2 and 3 default { link_message(integer linknum, integer num, string message, key id) { if (message == "ATTACHED") { // do stuff } if (message == "DETACHED") { // do some cleanup stuff } if (message == "TOUCHED") { // do stuff } }} I think the above scripts do what you want without all the confusing multiple events and states.
  7. After resetting the "allow attachment dialog" pops up. Clicking 'yes' results in a lot of ownersay spam, a couple of "Could not find script MultiScriptxx" and a attached box. Touching the attached box gives this: [12:50] Object: 1389387016 M3: touched in Runtime state [12:50] Object: 1389387016 U3: touched in Runtime state [12:50] Object: 1389387016 S3: touched in Runtime state
  8. You could maybe add a timer and use llGetAgentInfo() to check if the avatar is still sitting.
  9. A 1 second timer in combination with a counter might be what you need. Like this: integer seconds;default{ state_entry(){ llSetTimerEvent(1.0); } timer(){ ++seconds; if (seconds == 5){ // do something after 5 seconds } if (seconds == 7){ // do something after 7 seconds } seconds = 0; }}
  10. The gpu_table, for the linden viewers, is not up to date. If you're not using firestorm you need to replace the gpu_table.txt file in the secondlife viewer folder with the one from the zip file that TankMaster Finesmith created. You can find that zip here. Also see this Jira (STORM-1950).
  11. How about this: default { state_entry() { string texture = llGetInventoryName(INVENTORY_TEXTURE, 0); llParticleSystem([ PSYS_PART_FLAGS, PSYS_PART_EMISSIVE_MASK, PSYS_SRC_PATTERN, 4, PSYS_PART_START_ALPHA, 1.0, PSYS_PART_END_ALPHA, 1.0, PSYS_PART_START_COLOR, <1.0,1.0,1.0>, PSYS_PART_END_COLOR, <1.0,1.0,1.0>, PSYS_PART_START_SCALE, <1.0, 1.0, .0>, PSYS_PART_MAX_AGE, 1.20, PSYS_SRC_MAX_AGE, 0.00, PSYS_SRC_ACCEL, <0.0,0.0,0.0>, PSYS_SRC_ANGLE_BEGIN, 0.00, PSYS_SRC_ANGLE_END, 0.00, PSYS_SRC_BURST_PART_COUNT, 8, PSYS_SRC_BURST_RADIUS, .75, PSYS_SRC_BURST_RATE, 0.10, PSYS_SRC_BURST_SPEED_MIN, 0.00, PSYS_SRC_BURST_SPEED_MAX, 0.00, PSYS_SRC_OMEGA, <0.00,0.00,0.00>, PSYS_SRC_TEXTURE, texture ]); } changed(integer c) { if (c & CHANGED_INVENTORY) llResetScript(); }} Put the script together with a texture in some prims inventory.
  12. My 0.02 L$: string round( float F, integer decimals ) { decimals = llAbs(decimals); F = llRound(F * llPow(10, decimals)) / llPow(10, decimals); list temp = llParseString2List((string)F, ["."], []); string left = llList2String(temp, 0); string right; if(decimals) right = "." + llGetSubString(llList2String(temp, 1), 0, decimals - 1); return left + right;} default { state_entry() { llOwnerSay(round(456.94575824, 0)); }}
  13. I'ld just use some global variables. Like: vector pos; // position of the camera in region coordinates vector rot; // rotation of the camera in degrees Or am I missing something?
  14. I tried this little script: key HTTP;default{ touch_start(integer total_number) { HTTP = llHTTPRequest("http://opps.incarnate.me/test.php", [HTTP_METHOD, "POST", HTTP_MIMETYPE, "application/x-www-form-urlencoded"], ""); } http_response(key request_id, integer status, list metadata, string body) { if (request_id == HTTP) { llOwnerSay("Status: " + (string)status + "\nBody: " + body); } }} This is what I got back: [08:44] Object: Status: 200 Body: LSL Script answered:<br> Which makes me think your php script and server are working just fine. Allthough I'm probably missing the point completely
  15. As I'm mostly using the SL viewer I know nothing about Firestorm. I can tell you that I do not have any problems with windows 8. The SL viewer and Exodus both run like a charm.
  16. You could make a gesture. Have that trigger on "F2" or such button and let the gesture chat "/1 bouncey". That'll work.
  17. I just like if(toggle = !toggle) better than: if (!toggle) { toggle = TRUE; // etc.}else { toggle = FALSE; // etc.} Furthermore, in the case of my example script it does work on first touch after a reset.. State_entry() sets the media. First touch on the prim turns it off. Second touch turns it on again, and so forth. And, yes llClearPrimMedia() works just as well if the object is deeded to the land owning group.
  18. One problem is: left clicking on a face which has a web page on it is like clicking on the web page. So you either have to richt click and select "touch" from the menu, or click on a face of the prim that has no media. Having said that, here's one way to turn media on and off. integer toggle;SetMedia() { llWhisper(0, "Starting Media On Prim"); llSetPrimMediaParams(0, [PRIM_MEDIA_AUTO_PLAY, TRUE, PRIM_MEDIA_CURRENT_URL, "http://google.com", PRIM_MEDIA_HOME_URL, "http://google.com", PRIM_MEDIA_HEIGHT_PIXELS, 512, PRIM_MEDIA_WIDTH_PIXELS, 512]); }default { state_entry() { SetMedia(); } touch_start(integer num) { if (toggle = !toggle) { llClearPrimMedia(0); } else { SetMedia(); } }}
  19. Another function would be: llSetLinkColor(LINK_SET, <1.0, 0.0, 0.0>, ALL_SIDES);
  20. Did you use "Select face" to change the spare triangle texture and transparancy? If not,then that is what you´re doing wrong.
  21. llDetectedKey() only works in touch, sensor and collision events. So you have to make "key avatar_key;" a global variable and put "avatar_key = llDetectedKey(0);" in the touch event.
  22. Fog at a certain height is called clouds You can turn those off with: CTRL ALT SHIFT -
  23. You could follow @SLGridStatus on twitter. I do not know if that´s more reliable than the website though.
  24. I suppose llMapDestination( region, slurl_vector, ZERO_VECTOR); should work. However, according to the wiki, llMapDestinaition() only works for scripts attached to avatar, or during touch events. So maybe you´re trying something else?
×
×
  • Create New...