Jump to content

Xander Lopez

  • Content Count

  • Joined

  • Last visited

Community Reputation

5 Neutral

About Xander Lopez

  • Rank
  1. @Wulfie ReanimatorThanks i will check out the post!
  2. Lets say you are in mouselook mode and facing toward crowd of people. Is there a way to detect all those avatar's uuid within your current mouselook screen? I would say that avatar needs to be within 30 meters from you and just be on the direction where my mouselook is facing at.
  3. How can I start about creating a script that detects the avatar's uuid when you are looking at the avatar in mouselook mode? Let's say that I go into the mouselook mode. I pan my cam around and see an avatar about 30 meters away from me. I would like to figure out a way to somehow detect that avatar's uuid automatically without having to click mouse button. And I hope wouldn't have to use the llcastray because llcastray shoots such tiny beam that the chance of it detecting avatar is too slim... Is this even possible? which function should I start to look at?
  4. I created a string: string names; Now this string needs to have series of names concatenated by hyphen shown as below: amy-richard-sandra-april Okay so i am fine at this moment.. but now I have to enter 200 names in this one string. So I am trying to see how many characters can a string contain???
  5. So i can see from wiki that llCastRay will accept four filters RC_REJECT_AGENTS RC_REJECT_PHYSICAL RC_REJECT_NONPHYSICAL RC_REJECT_LAND What I am trying to achieve is a bit complicated. I am trying to create a weapon that can detect Avatar, AND ALSO certain type of prims. This special prims might have some special script inside, or maybe created by certain avatar, or maybe has some other indicator that says the prim is eligible for llCastRay to recognize. Is there any way to do this? If the ray hits any normal prims that are not eligible, i want it to just continue on until it hits any avatar or any valid prims. It seems very complicated to come up with this kind of rule. Any suggestions?
  6. I think the answer is probably no, but I just wanted to confirm this with someone knowledgeable... When llCastRay executes, I believe it shoots very very tiny ray to scan objects.. refer to this post Now, is there any possible way this tiny ray could be thicker? Perhaps.. 1 meter or 2 meters thick??
  7. so lets say i have the basic dialog script which opens up a menu so you can either choose "Yes" or "No". I have 100 of the same objects that contains the same script. Let's say the example is shown as below. Notice these 100 objects are all listening to channel -99. integer gListener; default { touch_start(integer total_number) { llListenRemove(gListener); gListener = llListen(-99, "", llDetectedKey(0), ""); llDialog(llDetectedKey(0), "\nyour answer is?", ["Yes", "No" ] , -99); llSetTimerEvent(60.0); } listen(integer chan, string name, key id, string msg) { if (msg == "Yes") ..... if (msg == "No") ..... } timer() { llListenRemove(gListener); llSetTimerEvent(0.0); } } Now, if i assign a different channel to all these 100 objects, they would have no problem identifying whos "no" means for which object. But I don't want to go thru and assigning a different channel to listen for 100 objects.. Is there anyway for each objects to listen to only "No" came from their own prim altho they are all listening to the same channel?
  8. so i was referring to the documentation shown here to create flight assist program. My objective is to simply reduce flight speed and not the run speed by modifying this code. After looking at the flight assist script, I am starting to have question as if the code inside the timer is necessary to fly slower now? timer() { if (llGetAgentInfo(llGetOwner()) & AGENT_FLYING) { llSetForce((<0.0,0.0,9.81> * llGetMass()),0); jump flight_off; } llSetForce(<0.0,0.0,0.0>,0); @flight_off; llSetTimerEvent(0.5); } It sounds like this portion was written so people could fly above certain height when secondlife in 2007 didn't allow you to fly above certain height. Can I omit this script portion inside the timer and still be able to fly slower with no problem?
  9. Question 1: It seems like these following codes pretty much bring the same result altho how it determines to see if both parties are in the same group is different. So which one would be faster to process? case 1: if (llDetectedGroup(0)) llOwnerSay("true"); case 2: if (llSameGroup(llDetectedKey(0))) llOwnerSay("true"); Question 2: I have Avatar A, and Avatar B comparing groups to see if they are wearing the same group. The problem is that the above fuctions will return true if both Avatar A and B are NOT wearing any group. I guess it treat as Avatar A and Avatar B are wearing the same group cuz technically both are wearing "no" groups. Is there anyway to return False if these avatars are not wearing any group??
  10. I am trying to create a radar which displays the distance between myself and my target avatar. (and also the target avatar's name thru llKey2Name) Here is the question. I think sensor is a thing of the past. Everyone talks about using http://wiki.secondlife.com/wiki/LlGetAgentList Though, I am not sure if i am on the right track. Would it make sense to use llGetAngetList to scan the target avatar, and calculate its distance every 0.1 seconds with timer event?? How should I start with the concept of creating this with the most lagless way?
  11. so i have a hud which opens a textbox llTextBox(llDetectedKey(0), "type your shout out", channel); Then the message received from llTextBox gets sent to another Prim called "Receiver" via llRegionSayTo() And this "Receiver" would display the message as hovertext llSetLinkPrimitiveParamsFast(0, [PRIM_TEXT, received_message, <1.0,1.0,1.0>, 1.0]); Then.. if the message was entered as "this is the first line. \nthis is the 2nd line.", it doesn't do the linebreak. Rather it displays as "this is the first line. \nthis is the 2nd line." How can I make sure that the hover text on receiver is shown as this is the first line. this is the 2nd line.
  12. I am trying to see if there is a way I can script to force users from stop flying? I searched wiki but i can't seem to find a good starting point to implement this. This would require no experience nor rlv. is this possible? Also, i was reviewing a flight assist script shown here because i want to find a way to prevent people from being able to move as I adjust the integer speed value. But decreasing the speed value doesn't seem to prevent people from moving around. Is there a way to effectively disable people from being able to move? or at least, move painfully slow?
  13. I have some complicated series of functions that call another function. And this is quite confusing to me. Let's say i have the following script. function1() { llOwnerSay("This chair is made of wood"); ... call more functions... } function2() { llOwnerSay("This chair is made of wood"); ... call more functions... } functionA (){ if (apple == 1) watermelon = 1; if (orange == 1) pineapple = 1; if (chair == 1) function1(); else if (desk == 1) function2(); } functionB () { llSetTimerEvent(2); } callMoreThanOneFunctions() { functionA();functionB();} So here is the confusing part. Let's say I called the function callMoreThanOneFunctions(). This would execute functionA first, and then execute functionB upon completion of the functionA. I want to execute callMoreThanOneFunctions() However, if (chair == 1) or (desk == 1) are true, I want to cancel calling functionB. I would like to avoid calling function1 and functionB when (chair == 1). How can I program this?
  14. Thanks for your explanation @Wulfie Reanimator I just did some couple testing and it appears to be that what you said is correct. (this makes my life a lot easier) I found the cause of my problem being originating from one of the llRegionSayTo.
  15. @Wulfie Reanimator Let me make sure that what you said also applies to the following scenario. Would "function2()" run ONLY after function1() is complete when StartMe() is executed? function1() { //contains 600 lines of code doing complex calculations and send out 5 different llRegionSayTo() and then finally set a global integer myValue = 100;} function2() { //simply read the global integer myValue and change some prim color } function3() { //contains another 300 lines of code doing complex calculations } StartMe() { function1(); function2(); function3(); }
  • Create New...