|
Celise Greenwood
Registered User
Join date: 30 Aug 2007
Posts: 3
|
12-08-2007 11:39
Okay, I had a look through the threads to see if this question had been answered. Forgive me if it has.
Me and a friend need some help on locating a teleporter script that will teleport an avvie between two points no matter where those two points are located.
Every script we have so far needs destination vectors, and because we want to eventually sell what we are making, this will not do. We are just after something that can get people from pad a to pad b without having to enter in vectors no matter where they are located.
If someone could please help, I'd appreciate it a whole lot.
Thank you.
|
|
Jesse Barnett
500,000 scoville units
Join date: 21 May 2006
Posts: 4,160
|
12-08-2007 11:59
Point a is no problem. You use llGetPos() but what exactly do you mean about TPing to point b w/o vectors? You mean you don't care where you end up?  What exactly are you planning as putting in as a destination, if it is not a destination? Without an understanding of these two basic concepts, I wouldn't be in a rush to get a product out on the market. Take your time, learn LSL, ask questions here. Sorry but there are more then enough products out with scripts that are barely functioning and are really wasteful of sim resources.
_____________________
I (who is a she not a he) reserve the right to exercise selective comprehension of the OP's question at anytime. From: someone I am still around, just no longer here. See you across the aisle. Hope LL burns in hell for archiving this forum
|
|
Viktoria Dovgal
…
Join date: 29 Jul 2007
Posts: 3,593
|
12-08-2007 12:42
You can get them to talk. A teleporter can llRegionSay on some channel "Yo, any teleporters in the house?" and the others can yell back "Uh yeah, I'm over at (x,y,z), you got a problem with that?" and then you know where to go. Thomas Conover's HPC teleporters do something like that. You might want to make at least some token attempt at security, and think harder about communications if you want to make this work across regions.
|
|
Celise Greenwood
Registered User
Join date: 30 Aug 2007
Posts: 3
|
12-08-2007 13:35
From: Jesse Barnett Point a is no problem. You use llGetPos() but what exactly do you mean about TPing to point b w/o vectors? You mean you don't care where you end up?  What exactly are you planning as putting in as a destination, if it is not a destination? Without an understanding of these two basic concepts, I wouldn't be in a rush to get a product out on the market. Take your time, learn LSL, ask questions here. Sorry but there are more then enough products out with scripts that are barely functioning and are really wasteful of sim resources. I would dream of selling a bad product. I'm just asking for some advice about a script so that I can learn more about what to do. Thanks for the advice. I'm gonna see if I can get something up and running and test it. I wonder which sim I end up in when I test it. *hugs* Cheers for that.
|
|
Jesse Barnett
500,000 scoville units
Join date: 21 May 2006
Posts: 4,160
|
12-08-2007 13:58
From: Celise Greenwood I would dream of selling a bad product. I'm just asking for some advice about a script so that I can learn more about what to do.
Thanks for the advice. I'm gonna see if I can get something up and running and test it. I wonder which sim I end up in when I test it.
*hugs*
Cheers for that. Well heck, learning is something different. Learning is what we are all about. Two ways to do it. A) have a hud that the owner can rez a teleporter pad/spot. When the telport pad is touched it tells the hud it's location plus approximately loc.z + 1 (one meter above the pad). The hud will then send a list of all other destinations to the pad and will llRegionSay the new destination to the other pads. If you are using the hud, then you can put an llDialog menu in to remove destinations you don't need anymore. B) you can also do the same thing without using a hud. The newly created pad llRegionSays it's location to the others and they add this new destination and then send out thier locations back to the new spot. Same as above, you need a way to delete destinations. Either way, you are also going to have to master llDialog for the pop up menu when you touch the pad. By the time you finish this little project you will have learned a thing or two  In case you haven't heard about it yet I would highly suggest downloading the most excellent creation of Alphons Jano: LSLEditor. With it you can not only script faster and easier but you can create a project such as a hud & pad and test them together or test communications between two pads. http://www.lsleditor.org/
_____________________
I (who is a she not a he) reserve the right to exercise selective comprehension of the OP's question at anytime. From: someone I am still around, just no longer here. See you across the aisle. Hope LL burns in hell for archiving this forum
|
|
Lafiel Takaaki
Registered User
Join date: 2 Oct 2007
Posts: 29
|
12-08-2007 19:24
That's not that easy to accomplish as you may think.
First of, you have to tell us, a) if the two teleporters you gonna teleport between each other, are limited to one sim or to many sims. b) should the teleporting be limited only to two teleporters who are "calibrated" to each other? Or should there be more then 2 teleporters connected to each other (i.e. if you use one teleporter you get a choise of possible destinations)
If you only have 2 teleporters, which should only teleport forth and back, then it's bit easier. When both teleporters are limited to only one Sim, then you could use the llRegionSay as "broadcast" and see if the other teleporter is in range. Once the other replied, you could check the IDs (i.e. let the user Put a notecard in his Teleporter, with a secret key or ID. Once rezzed, read this ID and use it to identify the teleporters.
For Exapmle if Teleporter A has "MySecretKey123" as Key/ID in the notecard, it would only accept coordinates from another teleporter with the same Key. So Teleporter A sends a broadcast with this ID (encrypted in some kind, so others can't intercept/fake reply to this). Teleporter B receives the Broadcast and checks if the ID is identical. If its identical, it sends a reply with his own coordinates. Teleporter A gets the coordinates and safe them. Now when you use it, it teleports you to that coordinates.
You can also add additonal checks, so that when the teleporter is moved, it sends a message via llRegionSay and tells the other teleporter, that it's coordinates changed and Teleporter A update his coordinates then.
If both teleporters can be located anywhere on the grid, it gets bit more complex. In this case, you need a kind of server, to manage this. Ingame Server (one object placed on a sim could do the work, but the disadvantage of this is, once you re-rez the server, it gets another ID and already sold objects couldn't comunicate with it). So basicly, only real solution would be to use an external webserver.
With external webserver, you could create a script, so everytime an object is rezzed (or moved) it would send a llHTTPRequest to your webpage, with it's secret key (mentioned above). That's the only additional thing you have to send. You can get the Object ID, Owner, Location (Regionname and coordinates) from Header information.
Safe this data into a database (either textbased or mysql, whatever you preffer). Whenever a object is moved, rezzed or reseted, it would send a llHTTPRequest updating it's info and the server would reply with the position of the other Teleporter (using same secret key) or a message, if no other teleporter is there with that key. This heavily relies on an external page, but is probably the best implementation. You just have to make sure, that the server will be accessible, as long as SL exists, because if server went's down, your teleporter product stops working. That's the disadvantage of this method.
If you wanna connect more than 2 teleporters, you could also use the broadcast thing (when they are limited to one zone) or webserver to for gridwide teleporter locations. But be aware, that if you return multiple teleporter positions via external webservert that http_response is capped to 2000 characters, so you maybe could only receive a few locations.
Edit: You could also use the XML-RPC to send the new position to the teleporter (once one was moved or rerezzed). Forgot the url you have to use for the XML-RPC thing, but i'm one of the residents will remind it and post it here ^^
|