Hi Chris,

I've been using the attached script from WhiteStar Magic on the New World Grid without any problems. It worked when the grid was 6.9 and continues to work now that it is running on 7.1

Jerry/Jerod

On 1/15/2012 9:19 AM, Fleep Tuque wrote:
It's been a while since I messed around with local teleports, in this case
I have a two story building and want the user to be able to teleport
between floors using a door object, and for some reason all of the teleport
scripts I have in inventory seem to be flinging my poor avatar out to the
edges of the region instead of putting me up one floor as it should.

Is there some wonky thing with local teleports in opensim that I don't know
about or is something weird going on with FleepGrid?  Does anyone have a
known good working script I can use?

Thanks in advance!

- Chris/Fleep


Chris M. Collins (SL/OS: Fleep Tuque)
Center for Simulations&  Virtual Environments Research (UCSIM)
UCIT Instructional&  Research Computing
University of Cincinnati
406A Zimmer Hall
315 College Drive
PO BOX 210088
Cincinnati, OH 45221-0088
[email protected]
(513) 556-3018

http://ucsim.uc.edu




_______________________________________________
Education mailing list
[email protected]
http://list.opensim-edu.org/listinfo.cgi/education-opensim-edu.org
//XEngine;lsl
// ----------------------------------------------------------------
// Script Title:    OS_Teleport(Touch & Collision)
// Created by:      WhiteStar Magic
// Creation Date:   25/11/2009
// Platforms:
//    OpenSim:       Y, Tested and Operational on OpenSim git# f605d59 - r11575
//
// Revision:        0.3
//
// Conditions:
// Please maintain this header. If you modify the script indicate your
// revision details / enhancements
//
// Support:         NONE
//
// Licensing:       OpenSource.  Do as you will with it!
//
// ================================================================
// NOTES:
// Single Target Destination ONLY
// Alternatives are available for Multi-Desination in the OSG Forums (Scripting 
forum)
//
// Set Destination as described below, There are a Few Options depending on 
Application:  
//      Destination = "1000,1000";                 = In-Grid Map XXXX,YYYY 
coordinates
//      Destination = "RegionName";                = In-Grid-TP to RegionName
//      Destination = "TcpIpAddr:Port:RegionName"; = HyperGrid-TP method
//      Destination = "DNSname:Port:RegionName";   = HyperGrid-TP method
// 
// Set your Desired Mode for Touch AND/OR Collision
// DEFAULT = Touch OFF, Collision ON
// 
========================================================================================
// 
// === SET DESTINATION INFO HERE ===
string Destination = "NewWorld Clinician - East";   // your target destination 
here (SEE NEXT LINES) Can Be
vector LandingPoint = <80,45,29>;     // the landing point for avatar to arrive 
at
vector LookAt = <0,0,0>;                 // which way they look at when arriving

// === SET USAGE MODES HERE ===
integer TouchTelePort = TRUE;          // set to TRUE if you want TP on Touch
integer CollideTeleport = FALSE;         // set to TRUE if you want to TP on 
Collision
//                                      // NOTE:  Collisions CAN be tricky in 
OpenSim 
// 
========================================================================================
//                  DO NOT MODIFY BELOW UNLESS YOU ARE CERTAIN
// 
========================================================================================
list LastAgents = [];                   // retention list for de-bouncer used 
for Collisions
                                        // preventing Multiple Triggers from 
occuring
key agent;
//
PerformTeleport( key AgentToTP )
{
    llWhisper(0, "Second Floor - Sandlow Clinician Education Center : 
"+Destination);
    
    integer TimeNow = llGetUnixTime();
    integer a_idx = llListFindList( LastAgents, [ AgentToTP ] );
    if (a_idx != -1)
    {
        integer TimeLast = llList2Integer( LastAgents, a_idx + 1 );
        if (TimeLast >= (TimeNow - 6)) return;
        LastAgents = llDeleteSubList( LastAgents, a_idx, a_idx+1);
    }
    LastAgents += [ AgentToTP, TimeNow ];  // agent just TP'd so add to list 
with NOWTIME
    osTeleportAgent(AgentToTP, Destination, LandingPoint, LookAt);    
}
//============
// MAIN APP 
//============  
default
{
    on_rez(integer start_param)
    {
        llResetScript();
    }
    changed(integer change)     // something changed, take action
    {
        if(change & CHANGED_OWNER)
        {
            llResetScript();
        }
        else if (change & 256)  // that bit is set during a region restart
        {                       
            llResetScript();
        }
    }
    
    state_entry()
    {
        string TOUCH = "OFF";
        string COLLIDE = "OFF";
        if(TouchTelePort) TOUCH = "ON";
        if(CollideTeleport) COLLIDE = "ON";
        llOwnerSay("Teleportal Active: Collision = "+COLLIDE+" / Touch = 
"+TOUCH);
    }
   
    touch_start(integer num_detected) 
    {
        key agent = llDetectedKey(0);
        if(TouchTelePort) PerformTeleport( agent );
    }
    
    // This is TRICKY / FLAKY  Alternates are COMMENTED here. REMOVE the first 
// and comment out the collision*() you wish to try
    //collision(integer num_detected)         // Triggers IMMEDIATE Response on 
Contact / Collision. OFTEN Causes Duplicate trigger
    //collision_end(integer num_detected)     // Will WAIT till collisions are 
COMPLETED, 
                                              // means a DELAY till collisions 
stop so you have to BACK OFF the prim & collisions Stop
                                              //
    collision_start(integer num_detected)   // Immediate Response, CAN cause 
multiple HITS, INFREQUENTLY (WORKS BEST)
    {
        key agent = llDetectedKey(0);
        if(CollideTeleport) PerformTeleport( agent );
    }
} 


_______________________________________________
Opensim-users mailing list
[email protected]
https://lists.berlios.de/mailman/listinfo/opensim-users

Reply via email to