Jump to content
Reiramon

RLV Teleport

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?

Share this post


Link to post
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

Share this post


Link to post
Share on other sites

just type in chat: tp2cam

Firestorm required and you need to activate the commands, there are more commands.

Since you mention FS it's no scripting question and I don't see the relation to RLV. Even if you script that I don't see the relation to RLV.

  • Haha 1

Share this post


Link to post
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.

 

Share this post


Link to post
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

Share this post


Link to post
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

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.


×
×
  • Create New...