This commit is contained in:
Fred Beckhusen
2015-08-07 15:34:30 -05:00
parent ce47ec2f3e
commit fde850293c
8080 changed files with 0 additions and 2443112 deletions

View File

@@ -1,3 +0,0 @@
<Solution name="Simple_Path_Script">
<Project name="Simple_Path_Script" path="Simple_Path_Script\Simple_Path_Script.prj" active="true"/>
</Solution>

View File

@@ -1,276 +0,0 @@
// :CATEGORY:Positioning
// :NAME:Simple_Path_Script
// :AUTHOR:Kimm Paulino
// :CREATED:2013-06-24 14:29:41.307
// :EDITED:2013-09-18 15:39:02
// :ID:765
// :NUM:1052
// :REV:1.0
// :WORLD:Second Life
// :DESCRIPTION:
// Path Setting Script
//
// In 'edit' mode, user moves the object and 'saves' various positions
// over time, then the positions can be replayed. This either uses the physical
// move functions to create smooth movement or non-physical movements
// for a slightly more jerky movement!
//
// NOTE: Positions and rotations are relative to the region, so if you
// move the prim, then the positions won't move with it - you'd have to
// reset the script (using the 'reset' button) and store a new path.
//
// Depending on the settings, the system can either loop forever
// or play just once.
//
// It also has the option of resetting if you change owners, which
// might be useful if you want new owners to be able to store their
// own paths.
//
// Kimm Paulino
// Oct 2010
//
// Copyright © 2009 Linden Research, Inc. Licensed under Creative Commons Attribution-Share Alike 3.0
From the Sl wiki at http://wiki.secondlife.com/wiki/User:Kimm_Paulino/Scripts#Simple_Path_Script
//
// :CODE:
integer gDebug = FALSE;
integer gPhysics = FALSE; // Set to use physical movements
integer gLoop = TRUE; // Set to continually loop through the movements
integer gResetOnOwnerChange = TRUE; // Set if want script to auto reset when changing owners
list gPositionData; // Always assume that there are the same numbers
list gRotationData; // of position and rotation data points
integer gCurrentIdx;
float gTimePeriod = 2.0;
float gTau = 5.0;
key gOwnerId;
integer gListen;
integer gTimeHandle;
integer gTauHandle;
string gHelpMsg = "Use EDIT mode to move your object, selecting 'Save' to save each position. Select 'Done' once complete. Don't forget to save your first position too!";
string gErrorMsg = "Something unexpected went wrong, suggest you reset the script!";
string SAVE_BTN = "Save";
string DONE_BTN = "Done";
string TIME_BTN = "Time Adjust";
string TAU_BTN = "Tau Adjust";
string RESET_BTN = "Reset";
string START_BTN = "Start";
string STOP_BTN = "Stop";
string START_MSG = "start"; // What a passer by can type in via chat
integer LISTEN_CH = 600;
integer TIME_CH = 900;
integer TAU_CH = 901;
doDebug (string msg)
{
if (gDebug)
{
llOwnerSay (msg);
}
}
doMove()
{
integer num_points = llGetListLength(gPositionData);
if (num_points != llGetListLength (gRotationData))
{
llOwnerSay (gErrorMsg);
disableMove();
return;
}
if (gCurrentIdx >= num_points)
{
if (gLoop)
{
// Loop around for another go
gCurrentIdx = 0;
}
else
{
// All complete
disableMove();
return;
}
}
doDebug ("Moving to position " + (string)gCurrentIdx);
vector next_pos = llList2Vector (gPositionData, gCurrentIdx);
rotation next_rot = llList2Rot (gRotationData, gCurrentIdx);
if (next_pos == ZERO_VECTOR && next_rot == ZERO_ROTATION)
{
// ignore
}
else
{
if (gPhysics)
{
llMoveToTarget(next_pos, gTau);
llLookAt(next_pos,1,1);
llRotLookAt(next_rot,1,1);
}
else
{
// doDebug ("moving to: " + (string)next_pos);
llSetRot (next_rot);
llSetPos (next_pos);
}
}
// Move on to the next point
gCurrentIdx ++;
}
dialog ()
{
list buttons;
if (gPhysics)
{
buttons = [SAVE_BTN, DONE_BTN, RESET_BTN, START_BTN, STOP_BTN, TIME_BTN, TAU_BTN];
}
else
{
buttons = [SAVE_BTN, DONE_BTN, RESET_BTN, START_BTN, STOP_BTN, TIME_BTN];
}
llDialog (gOwnerId, gHelpMsg, buttons, LISTEN_CH);
}
enableMove ()
{
if (gPhysics)
{
doDebug ("Enabling physical move");
llSetStatus (PRIM_PHYSICS, TRUE);
}
else
{
doDebug ("Enabling non-physical move");
llSetStatus(PRIM_PHYSICS, FALSE);
}
llSetTimerEvent (gTimePeriod);
gCurrentIdx = 0;
doMove ();

View File

@@ -1,7 +0,0 @@
vti_encoding:SR|utf8-nl
vti_timelastmodified:TR|08 Sep 2013 03:49:06 -0000
vti_extenderversion:SR|12.0.0.6211
vti_backlinkinfo:VX|
vti_author:SR|alien\\fred
vti_modifiedby:SR|alien\\fred
vti_timecreated:TR|18 Sep 2013 20:39:02 -0000

View File

@@ -1,6 +0,0 @@
<Project name="Simple_Path_Script" guid="D8EF649C-6C00-1014-B904-200204C60A89">
<Object name="Object" guid="D8EF6593-6C00-1014-B904-200204C60A89">
<Script name="Simple_Path_Script_1.lsl" guid="D8EF9E30-6C00-1014-B904-200204C60A89">
</Script>
</Object>
</Project>

View File

@@ -1,6 +0,0 @@
vti_encoding:SR|utf8-nl
vti_timelastmodified:TR|17 Aug 2013 23:32:41 -0000
vti_extenderversion:SR|12.0.0.0
vti_cacheddtm:TX|17 Aug 2013 23:32:41 -0000
vti_filesize:IR|275
vti_backlinkinfo:VX|

View File

@@ -1,6 +0,0 @@
vti_encoding:SR|utf8-nl
vti_timelastmodified:TR|17 Aug 2013 23:32:41 -0000
vti_extenderversion:SR|12.0.0.0
vti_cacheddtm:TX|17 Aug 2013 23:32:41 -0000
vti_filesize:IR|152
vti_backlinkinfo:VX|