Teleport to Ground from HUD

Répondre
Partager Rechercher
Hi!

I am searching for days for an active lsl help forum and found this

I need a simple script (i presume it's simple) but can't find it anywhere or a start on Wiki / Outworldz,
I want to teleport to the ground from a HUD, so just click the hud button / prim and go / teleport to ground.

I use a lot of planes and helicopters and when they brake ....

Greetings from The Netherlands aka Holland!
Hey Mr Holland ...
Put that script in a prim, wear the prim as a HUD and click it once you lost your plane....

Code PHP:

//
key  av;
vector pos;
float ground;
 
default
{
    
state_entry()
    {
      
av llGetOwner();
    }
 
    
touch_start(integer total_num)
    {
        
pos =llGetPos();
        
ground llGround(ZERO_VECTOR);
        
        
llRequestPermissions(avPERMISSION_TELEPORT);
    }
 
    
run_time_permissions(integer perm)
    {
        if(
PERMISSION_TELEPORT perm)
        {
            
llTeleportAgent(av"", <pos.x,pos.y,ground+1.0>, <0.00.00.0>);
        }
    }

Citation :
Publié par MenthalOH
Hey Mr Holland ...
Put that script in a prim, wear the prim as a HUD and click it once you lost your plane....

Code PHP:

//
key  av;
vector pos;
float ground;
 
default
{
    
state_entry()
    {
      
av llGetOwner();
    }
 
    
touch_start(integer total_num)
    {
        
pos =llGetPos();
        
ground llGround(ZERO_VECTOR);
        
        
llRequestPermissions(avPERMISSION_TELEPORT);
    }
 
    
run_time_permissions(integer perm)
    {
        if(
PERMISSION_TELEPORT perm)
        {
            
llTeleportAgent(av"", <pos.x,pos.y,ground+1.0>, <0.00.00.0>);
        }
    }

try this


key av;
vector pos;
float ground;
float water;
float heigh;

default
{
state_entry()
{
av = llGetOwner();
}

touch_start(integer total_num)
{
pos =llGetPos();
ground = llGround(ZERO_VECTOR);
water = llWater(ZERO_VECTOR);

if(ground<water)
ground = water;

llRequestPermissions(av, PERMISSION_TELEPORT);
}

run_time_permissions(integer perm)
{
if(PERMISSION_TELEPORT & perm)
{
llTeleportAgent(av, "", <pos.x,pos.y,ground+1.0>, <0.0, 0.0, 0.0>);
}
}
}
Répondre

Connectés sur ce fil

 
1 connecté (0 membre et 1 invité) Afficher la liste détaillée des connectés