Jump to content

InBeTwine Exonar

Resident
  • Posts

    41
  • Joined

  • Last visited

Reputation

0 Neutral

Recent Profile Visitors

The recent visitors block is disabled and is not being shown to other users.

  1. I am experiencing timer errors where the llSetTimerEvent(20.0) appears to run out too fast. If I change it to 40 seconds it will run out in approximately 20 seconds. Any ideas? Thanks in advance. string sound = "Found-the-platform"; default { state_entry() { llResetTime(); llListen(-5001,"", NULL_KEY, "Reset"); llSetTimerEvent(20.0); } listen(integer channel, string name, key id, string m) { if(m == "Reset") llDie(); } timer() { llSetTimerEvent(0.0); llRezObject("Surface Target Marker", llGetPos() + <0,0,1.72>,<0,0,0>,<0,0,0,0>,0); state visible; } } state visible { collision_start(integer total_number) { llRezObject("End Teleporter", llGetPos() + <0,0,2>,<0,0,0>,<0,0,0,0>,0); llTriggerSound(sound, 1.0); llShout(-5001, "KILL MARKER"); llSetTimerEvent(2.0); } timer() { llSetTimerEvent(0.0); llDie(); } }
  2. Hi Rolig, Looks like it hangs right after llRotBetween in this new line rotation new_rotation = llRotBetween string fltText = "Random Teleporter for Visible Trial"; //label that floats above Teleportlist a = [<33.423, 56.900, 20>,<33.423, 22.500, 20>,<50.700, 39.924, 20>,<16.623, 39.924, 20>]; // list of nearby targetinteger total; //so you can add or subtract things to the list without changing the scriptinteger chosen; //you choose an random float that is less then the total, then round down - this will give you a number that is between 0 and 1 less then the total number of entries in the line.vector targetPos;rotation new_rotation = llRotBetween( <1.0,0.0,0.0>, llVecNorm( <33.0,89.0,target.z> - target ) );//Script compile hangs here after llRotBetweenreset(){ vector target; chosen = llFloor(llFrand(llGetListLength(a))); targetPos = llList2Vector(a, chosen); target = (targetPos- llGetPos()) * (ZERO_ROTATION / llGetRot()); llSitTarget(target, new_rotation); llSetSitText("Teleport"); llSetText(fltText, <1,1,1>, 1);}default{ state_entry() { total = llGetListLength(a); reset(); } on_rez(integer startup_param) { reset(); } changed(integer change) { llSleep(0.15); llUnSit(llAvatarOnSitTarget()); reset(); } } ( <1.0,0.0,0.0>, llVecNorm( <33.0,89.0,target.z> - target ) );
  3. Hi folks, Now that I have a random teleporter working (thanks to the forum), I would like to add rotation parameters. The way that the script is being used is to randomly teleport the avatar to one of four locations in a water maze pool, but each time the avatar teleports I would like it to always face an object at xy coordinate (33, 39). I am guessing that my rotation scripting relative to the random target selected will need to be inserted at the target line, but not sure how to properly write it. Any help would be greatly appreciated. string fltText = "Random Teleporter"; //label that floats above Teleport list a = [ <33.423, 56.900, 20>, <33.423, 22.500, 20>, <50.700, 39.924, 20>, <16.623, 39.924, 20> ]; // list of nearby target integer total; //so you can add or subtract things to the list without changing the script integer chosen; //you choose an random float that is less then the total, then round down - this will give you a number that is between 0 and 1 less then the total number of entries in the line. vector targetPos; reset() { vector target; chosen = llFloor(llFrand(llGetListLength(a))); targetPos = llList2Vector(a, chosen); target = (targetPos- llGetPos()) * (ZERO_ROTATION / llGetRot()); //I am guessing that here is where I should be writing code to orient the avatar to xy coordinate (33, 39) llSitTarget(target, ZERO_ROTATION); llSetSitText("Teleport"); llSetText(fltText, <1,1,1>, 1); } default { state_entry() { total = llGetListLength(a); reset(); } on_rez(integer startup_param) { reset(); } changed(integer change) { llSleep(0.15); llUnSit(llAvatarOnSitTarget()); reset(); } }
  4. Hi Rolig, I wonder if this might be useful for creating a two-avatar stereoscopic camera.
  5. The object (Object a) that is doing the rezzing is within 10 meters of the target for the object to be rezzed (Target_01): I am trying to send a shout to Object a to trigger the rez. This is my idea of getting around the distance restriction on rezzing an object - the idea is to have an object capable of rezzing within the 10 meter limit and communicating with that object from a distance to trigger the rez.
  6. Hi Folks, Trying to rez an object (Target_01) from an nearby object (Object A) that is listening for an llShout event from a far object (Object B - at approx 80 meters). When I test the script, Object A registers that it has heard the shout but does not go on to rez Target_01. Below is my script: string object = "Target_01"; default { state_entry() { llListen(-5001,"", NULL_KEY, "Show Target_01"); } listen(integer channel, string name, key id, string m) { if(m == "Show Target_01") llSay(0,"Heard!"); state Rez; } } state Rez { state_entry() { llRezObject("Target_01", llGetPos() + <0,-12,-2>,<0,0,0>,<0,0,0,0>,0); llResetScript(); } }
  7. Thanks Rollig (and for all of your past help!), I will test it out.
  8. //script is below - thanks for looking at it. If I use list randomize and the first item - how would I write that after: vector targetPos = ???? string fltText = "Random Teleporter"; //label that floats above Teleport list a = [ <25.023, 54.473, 19.248>, <33.423, 54.473, 19.248>, <41.823, 54.473, 19.248>, <16.623, 47.199, 19.248>, <25.023, 47.199, 19.248>, <33.423, 47.199, 19.248>, <41.823, 47.199, 19.248>, <50.223, 47.199, 19.248>, <16.623, 39.924, 19.248>, <25.023, 39.924, 19.248>, <33.423, 39.924, 19.248>, <41.823, 39.924, 19.248>, <50.223, 39.924, 19.248>, <16.623, 32.650, 19.248>, <25.023, 32.650, 19.248>, <33.423, 32.650, 19.248>, <50.223, 32.650, 19.248>, <25.023, 25.375, 19.248>, <33.423, 25.375, 19.248>, <41.823, 25.375, 19.248> ]; // list of nearby target integer total = llGetListLength(a); //so you can add or subtract things to the list without changing the script integer chosen = llFloor(llFrand(a)); //you choose an random float that is less then the total, then round down - this will give you a number that is between 0 and 1 less then the total number of entries in the line. vector targetPos = llList2Vector(a, chosen); reset() { vector target; target = (targetPos- llGetPos()) * (ZERO_ROTATION / llGetRot(); llSitTarget(target, ZERO_ROTATION); llSetSitText("Teleport"); llSetText(fltText, <1,1,1>, 1); } default { state_entry() { reset(); } on_rez(integer startup_param) { reset(); } changed(integer change) { llSleep(0.15); llUnSit(llAvatarOnSitTarget()); reset(); } }
  9. Thanks for the reply - the script hangs at: integer total = llGetListLength(a); Is that a problem of how I have written my list?
  10. Greetings all, I am trying to write a script that will randomly select target positions for teleport from a list of targets. Stuck! Appreciate the help. thanks string fltText = "Random Teleporter"; //label that floats above Teleport list a = [<25.023, 54.473, 19.248>, <33.423, 54.473, 19.248>, <41.823, 54.473, 19.248>, <16.623, 47.199, 19.248>, <25.023, 47.199, 19.248>, <33.423, 47.199, 19.248>, <41.823, 47.199, 19.248>, <50.223, 47.199, 19.248>, <16.623, 39.924, 19.248>, <25.023, 39.924, 19.248>, <33.423, 39.924, 19.248>, <41.823, 39.924, 19.248>, <50.223, 39.924, 19.248>, <16.623, 32.650, 19.248>, <25.023, 32.650, 19.248>, <33.423, 32.650, 19.248>, <50.223, 32.650, 19.248>, <25.023, 25.375, 19.248>, <33.423, 25.375, 19.248>, <41.823, 25.375, 19.248>]; // list of nearby targets vector targetPos = // need script to randomly choose random target from list a; reset() { vector target; target = (targetPos- llGetPos()) * (ZERO_ROTATION / llGetRot()); llSitTarget(target, ZERO_ROTATION); llSetSitText("Teleport"); llSetText(fltText, <1,1,1>, 1); } default { state_entry() { reset(); } on_rez(integer startup_param) { reset(); } changed(integer change) { llSleep(0.15); llUnSit(llAvatarOnSitTarget()); reset(); } }
  11. Hi folks, I have created a simple prim (Water Platform 1) that will rez another simple prim (Water Platform 2) when touched and then die. Platform 1, when touched, will rez Platform 2 and then die. Each of the Platforms contains the other platform in its inventory. This works fine for only the first two times - on the third time Platform 2 seems to lose Platform 1 from its inventory and sends an error message that it cannot find Platform 1. Platform 1 script: default { state_entry() { llSetText("Touch to Switch Targets", <0.0,1.0,0.0>, 1); } touch_start(integer total_number) { llRezObject("Water Platform 2", llGetPos()+<0,4,0>,ZERO_VECTOR,ZERO_ROTATION,0); // the rez object is contained in this object's inventory llDie(); } } Platform 2 script default { state_entry() { llSetText("Touch to Switch Targets", <0.0,1.0,0.0>, 1); } touch_start(integer total_number) { llRezObject("Water Platform 1", llGetPos()-<0,4,0>,ZERO_VECTOR,ZERO_ROTATION,0); // the rez object is contained in this object's inventory llDie(); } } Any ideas?
  12. Hi folks! Does anyone know the default avatar walk speed in meters per second? Run speed?
×
×
  • Create New...