Welcome to the Second Life Forums Archive

These forums are CLOSED. Please visit the new forums HERE

Teleport Script

CamperDave Proudfoot
(_)|33P\ 1337 $xor
Join date: 16 Sep 2004
Posts: 205
02-21-2005 18:48
I have a problem in the following code.
CODE
integer flying = FALSE;
default
{
on_rez(integer sparam)
{
llSetStatus(STATUS_DIE_AT_EDGE, TRUE);
llSetBuoyancy(1.0);

if (sparam)
{
flying = TRUE;
}
}

collision_start(integer number)
{
if (flying)
{
llTeleportAgentHome(llDetectedKey(number));
llDie();
}
}
land_collision_start(vector pos)
{
if (flying)
{
llMakeExplosion(1, 0.3, 0.5, 0.7, 1.0, "smoke", <0,0,0>);
// llMakeExplosion(10, 1.0, 1, 1, 1.0, "fire", <0,0,0>);
llDie();
}
}
}


(Yes that is the Linden Bullet Script Modified)

Now, it does nothing on colission. No Teleport at all. :mad:
_____________________
The PWNED SHOP!


List of Cool Things I've done first... I think
  1. Put on sale a key mod that makes SL more like an FPS
  2. Made my own custom attachment points - looking for a good use
  3. Found "secret" login screen.
  4. Created a way to call Java methods from LSL --> Thread
Jillian Callahan
Rotary-winged Neko Girl
Join date: 24 Jun 2004
Posts: 3,766
02-21-2005 18:55
First, llTeleportAgentHome(llDetectedKey(0));
second, be sure the av is on your land.

if (llOverMyLand(llDetectedKey(0))) llTeleportAgentHome(llDetectedKey(0));
_____________________
CamperDave Proudfoot
(_)|33P\ 1337 $xor
Join date: 16 Sep 2004
Posts: 205
On MY Land?
02-21-2005 19:23
It needs the My land part? Or is that just more considerate... :rolleyes:
_____________________
The PWNED SHOP!


List of Cool Things I've done first... I think
  1. Put on sale a key mod that makes SL more like an FPS
  2. Made my own custom attachment points - looking for a good use
  3. Found "secret" login screen.
  4. Created a way to call Java methods from LSL --> Thread
Jillian Callahan
Rotary-winged Neko Girl
Join date: 24 Jun 2004
Posts: 3,766
02-21-2005 19:39
It only works on your land - anywhere else and it doesn't do much except tell people an object tried to TP them.
I love the eye-roll at "considerate". :rolleyes:
_____________________
FireDancer Steptoe
Registered User
Join date: 14 Dec 2004
Posts: 11
Here's my TP script..works great!
02-23-2005 19:26
Here's one a friend gave me. Just change the target vectors. Enjoy
FireDancer





vector targetPos = <156.5, 115, 44>; //The target location

reset()
{
vector target;

target = (targetPos- llGetPos()) * (ZERO_ROTATION / llGetRot());
llSitTarget(target, ZERO_ROTATION);
llSetSitText(llGetObjectName());
}
default
{
state_entry()
{
reset();
}

on_rez(integer startup_param)
{
reset();
}

changed(integer change)
{
llUnSit(llAvatarOnSitTarget());
reset();
}
}
Reitsuki Kojima
Witchhunter
Join date: 27 Jan 2004
Posts: 5,328
02-24-2005 05:23
Yes, it needs to be on your land.

It doesn't technicly need the script function to check it, but it won't work if it's not over your land.

Otherwise you would have a gun that could 'kill' someone anywhere.

Honestly, what did you expect? :)
_____________________
I am myself indifferent honest; but yet I could accuse me of such things that it were better my mother had not borne me: I am very proud, revengeful, ambitious, with more offenses at my beck than I have thoughts to put them in, imagination to give them shape, or time to act them in. What should such fellows as I do crawling between earth and heaven? We are arrant knaves, all; believe none of us.
Waves Lightcloud
SexBall Safety Designer
Join date: 22 May 2004
Posts: 193
02-24-2005 05:38
Is this between sims or point 2 point same sim ?
Richard Pinkerton
Registered User
Join date: 20 Jan 2005
Posts: 125
02-24-2005 05:53
Jeez, the sooner llTeleportAgentHome() goes, the better.
Reitsuki Kojima
Witchhunter
Join date: 27 Jan 2004
Posts: 5,328
02-24-2005 09:42
From: Richard Pinkerton
Jeez, the sooner llTeleportAgentHome() goes, the better.


Um.

While your certainly entitled to your opinion, what does this particular post have to do with getting rid of llTeleportAgentHome? It can't be used in this manner anyhow.
_____________________
I am myself indifferent honest; but yet I could accuse me of such things that it were better my mother had not borne me: I am very proud, revengeful, ambitious, with more offenses at my beck than I have thoughts to put them in, imagination to give them shape, or time to act them in. What should such fellows as I do crawling between earth and heaven? We are arrant knaves, all; believe none of us.
Richard Pinkerton
Registered User
Join date: 20 Jan 2005
Posts: 125
02-24-2005 10:49
The whole idea that someone would even want to make a bullet script that teleported the victim on impact I find obnoxious.
Jeffrey Gomez
Cubed™
Join date: 11 Jun 2004
Posts: 3,522
02-24-2005 11:24
Since this is now a rhetoric question:

To be blunt and honest, residents do have the right to be obnoxious on their land so long as it doesn't disturb the normal traversal of avatars from Point A to Point B through, but not to, the parcel (and to a lesser extent, other issues like land extortion). As much as it can be a pain, such is the cost of freedom.

It's a big issue of debate. As far as I'm concerned, llTeleportAvatarHome should have a range limitation in addition to simply being on the parcel - say, 10m - and if needed, a server-enforced five second countdown with warning before the teleport. I took the former idea to the Lindens already, even if the reply is purposefully amorphous.

I hope you're taking notes though, CamperDave. These are issues you should be thinking about if you wish to avoid "Disturbing the Peace" appeals from Residents. In general, you'll probably be fine, but be wary.
_____________________
---
CamperDave Proudfoot
(_)|33P\ 1337 $xor
Join date: 16 Sep 2004
Posts: 205
Well
02-24-2005 12:14
From: someone
The whole idea that someone would even want to make a bullet script that teleported the victim on impact I find obnoxious.
From: someone


It was for a game...
_____________________
The PWNED SHOP!


List of Cool Things I've done first... I think
  1. Put on sale a key mod that makes SL more like an FPS
  2. Made my own custom attachment points - looking for a good use
  3. Found "secret" login screen.
  4. Created a way to call Java methods from LSL --> Thread
Traxx Hathor
Architect
Join date: 11 Oct 2004
Posts: 422
02-26-2005 07:05
Firedancer, that looks exactly like the code in Hank Ramos's tp script I got from SL University. (hope that resource remains available in some form now that Phobos and Bonnydoon are changing hands)

The script is fun to use for teleporting through a maze, but I have one question: how do you eliminate all the rotation adjustments your av makes when arriving at the destination?