Nimue Mistwalker Posted December 18, 2011 Share Posted December 18, 2011 I'm wanting to use tp's instead of stairs for the house that I'm building. I've seen them in other builds, but, I've gone completely blank at the moment... Can someone please tell me where I might get a script like this?Thanks in advance! Link to comment Share on other sites More sharing options...
Rolig Loon Posted December 18, 2011 Share Posted December 18, 2011 The simplest teleporter, if you are going less than 10m, is simply a prim that moves to the new location when you sit on it and then returns when you stand up. With no frills at all, that's .... vector gTarget = <128,128,23>; // Your own target coordinate go here. Must be within 10m of gHomevector gHome;default{ state_entry() { gHome = llGetPos(); llSitTarget(<0.0,0.0,0.1>,ZERO_ROTATION); } changed (integer change) { if(llAvatarOnSitTarget()) { llSetPos(gTarget); llUnSit(llAvatarOnSitTarget()); } else { llSetPos(gHome); } }} You'll want frills, but that's the basics. 1 Link to comment Share on other sites More sharing options...
Nimue Mistwalker Posted December 18, 2011 Author Share Posted December 18, 2011 Thanks so much! That's just what I was looking for.. no frills, just simple tp :matte-motes-bashful-cute-2: Link to comment Share on other sites More sharing options...
Dora Gustafson Posted December 18, 2011 Share Posted December 18, 2011 I dare say the 'sit teleporter' is more simple and it teleports up to 300m vector target=<162,134,27>; // Enter the target coordinates here!!! default { state_entry() { llSetClickAction(CLICK_ACTION_SIT); llSitTarget(( target - llGetPos())/llGetRot(), ZERO_ROTATION/llGetRot()); } changed(integer change) { llUnSit(llAvatarOnSitTarget()); } } It may be a good idea to insert a llSleep(t); before the llUnsit(). t may be one or two seconds. Link to comment Share on other sites More sharing options...
Rufus Darkfold Posted December 22, 2011 Share Posted December 22, 2011 If you want something that moves more like an elevator, this one is nice and smooth. It uses llSetKeyframedMotion(): // simple smooth elevator/transporter script using llSetKeyframedMotion()// by Rufus Darkfold - This is Public Domainfloat movetime = 3.0; // time in seconds the trip should take. speed limit 250m/sec.vector distance = <0.0, 0.0, 60.0>; // how far to go - use the x and y if you want to go sideways.// You can do sim crossings, but don't go too fast.key sitter;default{ state_entry() { llSetPrimitiveParams([PRIM_PHYSICS_SHAPE_TYPE, PRIM_PHYSICS_SHAPE_CONVEX]); // needs new physics. llSitTarget(<0.0,0.0,-.1>, ZERO_ROTATION); // adjust as needed, it only needs to be set to something } changed(integer change) { if (change & CHANGED_LINK) { sitter = llAvatarOnSitTarget(); if (sitter != NULL_KEY) { vector pos = llGetPos(); llSetKeyframedMotion([distance, ZERO_ROTATION, movetime], [KFM_MODE, KFM_FORWARD]); llSleep(movetime + 1.0); // wait for it to finish llUnSit(sitter); llSetKeyframedMotion([distance, ZERO_ROTATION, movetime], [KFM_MODE, KFM_REVERSE]); llSleep(movetime + 0.5); // wait for it to finish llSetPos(pos); // should be almost there already, correct for keyframe motion drift } } }} 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