These forums are CLOSED. Please visit the new forums HERE
Teleporter object with landmarks |
|
|
Sebastian Glitterbuck
Registered User
Join date: 14 Feb 2005
Posts: 23
|
12-13-2006 17:54
I've seen some nice teleporter scripts.. I'm really wondering how you might have it read from one or more landmarks placed in the object with the script.. rather than hard coding it or using a notecard. My dream teleporter script also activates when moved through or second best is when touched/clicked. Has anyone figured this all out that might be willing to share?
|
|
Geuis Dassin
Filming Path creator
Join date: 3 May 2006
Posts: 565
|
12-13-2006 18:11
here's your teleport code:
warpPos( vector destpos ) { //R&D by Keknehv Psaltery, 05/25/2006 //with a little pokeing by Strife, and a bit more //some more munging by Talarus Luan //Final cleanup by Keknehv Psaltery // Compute the number of jumps necessary integer jumps = (integer)(llVecDist(destpos, llGetPos()) / 10.0) + 1; // Try and avoid stack/heap collisions if (jumps > 100 ) jumps = 100; // 1km should be plenty list rules = [ PRIM_POSITION, destpos ]; //The start for the rules list integer count = 1; while ( ( count = count << 1 ) < jumps) rules = (rules=[]) + rules + rules; //should tighten memory use. llSetPrimitiveParams( rules + llList2List( rules, (count - jumps) << 1, count) ); } just feed it the vector coordinates of where you want the prim to warp to. on the prim, under the General tab at the bottom there's drop down menu that says Touch/Grab. Change it to Sit. You avatar will auto-sit on that prim. you will need to add code to get the destination coordinates, and then feed them to the above chunk of code. At the very end, once your prim has moved, make sure you do llUnsit() so your avatar will stand up |
|
Boss Spectre
Registered User
Join date: 5 Sep 2005
Posts: 229
|
12-13-2006 19:17
You can read landmarks from object inventory using the llRequestInventoryData() function which raises a dataserver() event with the landmark data.
You can find examples at http://lslwiki.com/lslwiki/wakka.php?wakka=llRequestInventoryData and http://lslwiki.com/lslwiki/wakka.php?wakka=llMapDestination ~Boss |
|
Alexis Starbrook
CEO - Alexis Digital
Join date: 7 Dec 2006
Posts: 135
|
12-13-2006 21:29
As far as I know you can use a 'sensor' to automatically move or teleport whatever enter the area but I don't know if it can be givin a small enough area. Some 'home security' item do this
_____________________
|
|
ed44 Gupte
Explorer (Retired)
Join date: 7 Oct 2005
Posts: 638
|
12-14-2006 03:08
Most people when talking about teleporters are talking about changing the sit position of an object to be where you want to go. You know every object has a sit position, and that position can be changed by up to 300m on any axis.
See: http://rpgstats.com/wiki/index.php?title=LlSitTarget The two parts involve changing the sit target property of the prim and then dealing with the avatar when he does sit on the prim and activates the changed event. The prim itself does not move. We are still waiting for LL to implement llTeleport lol. OTOH, Geuis Dassin is talking about the hack where you really do sit on a non-physical prim, probably its original sit on position, and then this prim moves both you and itself to another location |
|
ed44 Gupte
Explorer (Retired)
Join date: 7 Oct 2005
Posts: 638
|
12-14-2006 03:16
As far as I know you can use a 'sensor' to automatically move or teleport whatever enter the area but I don't know if it can be givin a small enough area. Some 'home security' item do this You are talking about LlTeleportAgentHome and llEjectFromLand http://rpgstats.com/wiki/index.php?title=LlTeleportAgentHome http://rpgstats.com/wiki/index.php?title=LlEjectFromLand You can also be orbited into space with LlPushObject. http://rpgstats.com/wiki/index.php?title=LlPushObject |
|
Sebastian Glitterbuck
Registered User
Join date: 14 Feb 2005
Posts: 23
|
12-14-2006 05:02
OTOH, Geuis Dassin is talking about the hack where you really do sit on a non-physical prim, probably its original sit on position, and then this prim moves both you and itself to another location Right thats the method I'm looking at.. it's in most of the more recent posted teleport scripts.. there are some teleporters I've encountered that operate from a left-click for 1-click operation, so I imagine the left-click is passing to the WarpPos function. I've seen examples where moving the av onto a prim triggers triggers an action too like some of the stations in the Particle Lab, guess I'll need to look at that more closely since I haven't seen what I'm looking for on sale anywhere. And Boss - thanks for pointing to the call to read landmarks in inventory. |
|
Tiarnalalon Sismondi
Registered User
Join date: 1 Jun 2006
Posts: 402
|
12-14-2006 05:27
Well, there's probably about as many different teleporters as there are vehicles out there. Seemingly the more popular are Aubretec(sp?) and Cubey Terra as I've seen those rather frequently. Both have nice features, though I've haven't played with the Aubretec one much to see exactly what it does.
I've recently made one that operates similar to the Cubey Terra one, though you don't have the cumbersome "Next"/"Prev" buttons to pick the location from the notecard in the pad and uses warpPos to transport instantly (because I hate the whole 10m jump at a time while hiding in an invisiprim thing) |
|
Sebastian Glitterbuck
Registered User
Join date: 14 Feb 2005
Posts: 23
|
12-17-2006 17:33
I've seen some nice teleporter scripts.. I'm really wondering how you might have it read from one or more landmarks placed in the object with the script.. rather than hard coding it or using a notecard. My dream teleporter script also activates when moved through or second best is when touched/clicked. Has anyone figured this all out that might be willing to share? meh. I found in the LSL Wiki how to detect a collision but you can't: 1. Force the av to sit. 2. Mimic a touch to make a sit-on-touch enabled object seat the av. ![]() So much for the walk-through teleporter idea.. |
|
Elsewhere Essex
Registered User
Join date: 8 Sep 2006
Posts: 50
|
12-17-2006 20:34
meh. I found in the LSL Wiki how to detect a collision but you can't: 1. Force the av to sit. 2. Mimic a touch to make a sit-on-touch enabled object seat the av. ![]() So much for the walk-through teleporter idea.. um, yes you can. In the edit panel take a look at the bottom of the pane in the general tab. you'll note a default left click action assignment drop down. Sit on left click is one of the choices. even if the object is script ed with a touch event, this will override it and give the end user a chair icon, that when the object is clicked, sit them on it. the touch portion of the script can be accessed by right clicking and selecting "touch" from the pie menu. |
|
2fast4u Nabob
SL-ice.net
Join date: 28 Dec 2005
Posts: 542
|
12-18-2006 15:34
So much for the walk-through teleporter idea.. Not so fast....visit a sim called The Future. Seifert Surface made an amazing teleporter system there that pushes avatars to their destination. Just walk into a teleporter cone and the system pushes you through a series of tunnels and other 'pusheers' to get you to your destination. The system might be along the lines of what you're thinking of. While you are there, visit the Crooked House - another one of Seifert's amazing creations! -2fast |