Welcome to the Second Life Forums Archive

These forums are CLOSED. Please visit the new forums HERE

building tools

Nada Epoch
The Librarian
Join date: 4 Nov 2002
Posts: 1,423
11-26-2002 16:52
I was wondering if we could get a tool that allows us to move objects relative to themselves, rather than the world coordinates?

I tried to put a couple examples, but they all sounded stupid. So if it doesn't make sense, say so, and I will attempt to better explain myself.
_____________________
i've got nothing. ;)
bUTTONpUSHER Jones
professional puddlejumper
Join date: 10 Oct 2002
Posts: 172
11-26-2002 17:21
do you mean a "mirror object over x-axis" tool?
Nada Epoch
The Librarian
Join date: 4 Nov 2002
Posts: 1,423
11-26-2002 23:21
no, but that would be nice as well. What I want is a tool that when i say go 16m north it does, rather than me having to add 16m to its current coordinate. Wow, that was much easier than when i was trying before.
_____________________
i've got nothing. ;)
Celerity Epoch
Genius in absentia
Join date: 13 Nov 2002
Posts: 179
you could have my baseline script
11-27-2002 05:52
which does exactly that. Currently I'm using it to move my vehicle around in the air while I build, but I've thrown it on objects I was building as well.

Nowhere near as cool as having it be part of the build set by default, but it'll do in a pinch.
Nada Epoch
The Librarian
Join date: 4 Nov 2002
Posts: 1,423
11-27-2002 07:44
script is something like this?

vector pos;
default
{
state_entry()
{
pos = llGetPos();
llSetStatusPhysics(STATUS_PHYSICS,TRUE);
}
touchstart()
{
pos.x += 16;
llMoveToTarget(pos, 1.5);
}
}

yeah, that will work as a work around heh, celerity, lets make custom building tools :-)
_____________________
i've got nothing. ;)
Celerity Epoch
Genius in absentia
Join date: 13 Nov 2002
Posts: 179
buiding blocks of eternity.
11-27-2002 08:50
ok. caveats :

if you plan on using this on a vehicle, it will have to enclose you or it'll leave you behind (I use a sphere hoow it, advanced cut it (.6-1.) get in, then un cut it.)

set the home pos to something near where you'll be working.

there's no deadman's switch on this, if it leaves without you, you're outta luck.

it operates on the world axis, not yours (next up "forward, back, left, right" commands)

and I did this off the top of my head since I can't get in world so it hasn't been debugged the way the in game one has.

I like your idea about the hover board, I think I could build one now, maybe I'll try tonight.j

integer status=0;
// CHANGE THESE!
vector homePos=<0,0,0>;
rotation homeRot=<0,0,0,1>;
RESET()
{
// resets to default location
llSetStatus(STATUS_PHYSICS,FALSE);
llSleep(0.2);
llSetRot(homeRot);
llSetPos(homePos);
}

default
{
state_entry()
{
llListen(0,"",llGetOwner(),"";);
llSetStatus(STATUS_ROTATE_X|STATUS_ROTATE_Y|STATUS_ROTATE_Z,FALSE);
llSetStatus(STATUS_PHYSICS,TRUE);
status=0;

}

listen(integer a, string n, key id, string m)
{
string temp; // this will hold the beginning part of our commands.

temp = llGetSubString(m,0,3);
if (temp== 'halt') {
llSensorRepeat(); // I never remember these, but set the range to 0.0 to cancel.
llSetTimerEvent(0); // ok, so I'm not using either timers or sensors for this, but just in case.
llSetStatus(STATUS_PHYSICS,FALSE);
llSleep(0.2);
}

temp = llGetSubString(m,0,4);
if (temp== 'reset') {
RESET();
}

temp = llGetSubString(m,0,2);
if (temp== 'pos') {
llSay(0,"Current Position: " + (string)llGetPos());
}


// object must be active for any movement to happen..
if (status=>0) {
float command; // this will hold numerical values passed to commands
vector targetPos; // where to go
float tau; // how fast to go there
// I should make this change depending on the magnitude of the positional translation, but haven't bothered yet.

temp = llGetSubString(m,0,4);
if (temp== 'west ') { // use space as delimeter so include to limit scope
command=(float)llGetSubString(m,5,-1); // grab from last character of command to EoS
targetPos=llGetPos()+<-command,0,0>;
llMoveToTarget(targetPos,tau);
}

temp = llGetSubString(m,0,4);
if (temp== 'east ') {
command=(float)llGetSubString(m,5,-1);
targetPos=llGetPos()+<command,0,0>;
llMoveToTarget(targetPos,tau);
}

temp = llGetSubString(m,0,5);
if (temp== 'north ') {
command=(float)llGetSubString(m,6,-1);
targetPos=llGetPos()+<0,command,0>;
llMoveToTarget(targetPos,tau);
}


temp = llGetSubString(m,0,5);
if (temp== 'south ') {
command=(float)llGetSubString(m,6,-1);
targetPos=llGetPos()+<command,0,0>;
llMoveToTarget(targetPos,tau);
}

temp = llGetSubString(m,0,3);
if (temp== 'up ') {
command=(float)llGetSubString(m,4,-1);
targetPos=llGetPos()+<0k,0,command>;
llMoveToTarget(targetPos,tau);
}

temp = llGetSubString(m,0,4);
if (temp== 'down ') {
command=(float)llGetSubString(m,5,-1);
targetPos=llGetPos()+<0,0,-command>;
llMoveToTarget(targetPos,tau);
}
}
}
Celerity Epoch
Genius in absentia
Join date: 13 Nov 2002
Posts: 179
damn.
11-27-2002 08:51
we need a board that allows whitespace
<pre>
this is a preformatted message
with spacing
</pre>