Welcome to the Second Life Forums Archive

These forums are CLOSED. Please visit the new forums HERE

Teleport by single touch - How to ?

Henry Grumiaux
Registered User
Join date: 23 Jan 2007
Posts: 142
12-05-2007 19:46
Hi All ! I need to create a teleport, but instead ppls use the second mouse button on the teleport and choose the "sittext", a simple touch should teleport the agent.Bellow my code.It's works, but using the sit method.What should I do to perform my needs ? ty !

default
{
state_entry()
{
vector target = <137,84,25>;
rotation my_rot=llGetRot();
llSitTarget((target - llGetPos()) / my_rot,ZERO_ROTATION / my_rot);
llSetSitText("Teleport";);




}
touch_start(integer total_number)
{


}
changed(integer change)
{
if(change & CHANGED_LINK)
{
key id = llAvatarOnSitTarget();
if(id != NULL_KEY)
{
//llSleep(0.1);

llUnSit(id);
}
}
}

}
Darien Caldwell
Registered User
Join date: 12 Oct 2006
Posts: 3,127
12-05-2007 20:59
edit the object, and on the bottom of the General Tab of the edit menu, will be a section that says:

"When Left-Clicked:"

And has choices. Choose "Sit on Object".

Then just by clicking once, they will be seated on the teleporter, and be whisked off to their destination. :)
_____________________
Henry Grumiaux
Registered User
Join date: 23 Jan 2007
Posts: 142
12-06-2007 06:03
From: Darien Caldwell
edit the object, and on the bottom of the General Tab of the edit menu, will be a section that says:

"When Left-Clicked:"

And has choices. Choose "Sit on Object".

Then just by clicking once, they will be seated on the teleporter, and be whisked off to their destination. :)


Thanx a Lot !