Reiramon Posted September 6, 2019 Share Posted September 6, 2019 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 More sharing options...
Rolig Loon Posted September 6, 2019 Share Posted September 6, 2019 (edited) 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 September 6, 2019 by Rolig Loon 1 Link to comment Share on other sites More sharing options...
Nova Convair Posted September 6, 2019 Share Posted September 6, 2019 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. 1 Link to comment Share on other sites More sharing options...
Kyrah Abattoir Posted September 7, 2019 Share Posted September 7, 2019 People tend to assume a lot of the more "controlling" options for LSL require RLV. Link to comment Share on other sites More sharing options...
Reiramon Posted September 7, 2019 Author Share Posted September 7, 2019 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 More sharing options...
Mollymews Posted September 7, 2019 Share Posted September 7, 2019 (edited) 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 September 7, 2019 by Mollymews "/" 1 Link to comment Share on other sites More sharing options...
Reiramon Posted September 8, 2019 Author Share Posted September 8, 2019 (edited) 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 September 8, 2019 by Reiramon 1 Link to comment Share on other sites More sharing options...
Recommended Posts
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