Jump to content

RLV Teleport


Reiramon
 Share

You are about to reply to a thread that has been inactive for 1685 days.

Please take a moment to consider if this thread is worth bumping.

Recommended Posts

Hello,

I want to create a simple teleporter script for myself using the RLV in Firestorm.

My problem is every single time I try the debug channel returns with "failed : (thingy error).

I would like to have it TP me to camera position but I can not find how to do it. I thought look_at is a possible, but apparently it is not.

There are HUDs available that can do this but I wanted to create my own just for my personal use.

Any ideas?

Link to comment
Share on other sites

You may have discovered that I sell a Cam and Go HUD in Marketplace that does this.  It doesn't involve RLV at all.  The guts of it are quite simple:

default
{
    touch_start(integer total_number)
    {
        llRequestPermissions(llDetectedKey(0),PERMISSION_TRACK_CAMERA);
    }
    
    run_time_permissions(integer perm)
    {
        if ( perm & PERMISSION_TRACK_CAMERA)
        {
            vector CamPos = llGetCameraPos();
            llMapDestination(llGetRegionName(),CamPos, ZERO_VECTOR);
            llResetScript();
        }
    }
}

My own application of it uses a bit more magic to make sure that the script works in places where scripts are disabled, etc, but that's really all that's necessary to TP to cam position.  Not really much of a secret. ;)

EDIT: If I were scripting in an Experience, I would use a experience_permissions event instead of run_time_permissions and would use llTeleportAgent instead of llMapDestination, but the same general logic would work.  RLV should handle things in a parallel fashion.  In fact, since llTeleportAgent will always teleport the owner, you wouldn't even need to be in an Experience.

Edited by Rolig Loon
  • Like 1
Link to comment
Share on other sites

On 9/6/2019 at 9:36 PM, Rolig Loon said:

You may have discovered that I sell a Cam and Go HUD in Marketplace that does this.  It doesn't involve RLV at all.  The guts of it are quite simple:


default
{
    touch_start(integer total_number)
    {
        llRequestPermissions(llDetectedKey(0),PERMISSION_TRACK_CAMERA);
    }
    
    run_time_permissions(integer perm)
    {
        if ( perm & PERMISSION_TRACK_CAMERA)
        {
            vector CamPos = llGetCameraPos();
            llMapDestination(llGetRegionName(),CamPos, ZERO_VECTOR);
            llResetScript();
        }
    }
}

Thanks a lot for your reply! I tried your script but I must say I am looking for something different.

Perhaps I should have phrased my question better.

I wanted my teleporter to TP me after clicking the HUD button immediately - no maps, no permissions pop up to teleport. That is why I thought I needed RLV. 

This is the debug info line from my teleporter "executes: @tpto:Sandbox/40.469200/157.406000/2497.581000=force". It uses a RLV command.

I wanted to know how to let to script know to find the camera position and region in said command e.g @tpto:<region><position><camera>. I am very new to scripting, been trying different things to make it work but nothing really worked.

After typing my first post I realised that maybe noone would be willing to pitch in and actually provide me the info as the script is generating people money.

 

Link to comment
Share on other sites

Reiramon,  Rolig's example gives you all the basics needed to do this

given example vector CamPos then format it appropriately for your specific use.  Example formatting: 

"@tpto" + llGetRegionName() + "/" + (string)CamPos.x + "/" + (string)CamPos.y + "/" + (string)CamPos.z + "=force"

more info here:  http://wiki.secondlife.com/wiki/LlGetCameraPos

Edited by Mollymews
"/"
  • Like 1
Link to comment
Share on other sites

21 hours ago, Mollymews said:

Reiramon,  Rolig's example gives you all the basics needed to do this

given example vector CamPos then format it appropriately for your specific use.  Example formatting: 


"@tpto" + llGetRegionName() + "/" + (string)CamPos.x + "/" + (string)CamPos.y + "/" + (string)CamPos.z + "=force"

more info here:  http://wiki.secondlife.com/wiki/LlGetCameraPos

Thank you!! I managed to make it work!

You missed a single " : " in the provided line ...I caught it while reading the debug channel error wondering what I missed.

"@tpto":
Edited by Reiramon
  • Like 1
Link to comment
Share on other sites

You are about to reply to a thread that has been inactive for 1685 days.

Please take a moment to consider if this thread is worth bumping.

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
 Share

×
×
  • Create New...