Welcome to the Second Life Forums Archive

These forums are CLOSED. Please visit the new forums HERE

WarpPos -- llSetPos without the limits

grumble Loudon
A Little bit a lion
Join date: 30 Nov 2005
Posts: 612
01-12-2008 20:39
I ended up having to buy 2000sq and then dump all but a 4m wide section in order to get my warp pos teleporters to move back and forth reliably.

I also had to add a .5 sec delay before and after the unsit to allow the avatar and the prim to settle before the prim went back.
Roj Snook
Registered User
Join date: 2 Jun 2007
Posts: 49
01-15-2008 15:05
Qie helped me out in-world and found that a neighbouring plot had object entry and scripts all turned off - I sent a polite IM asking if they could turn them on (with object return set at 1 min) and they replied that yes, they'd be happy to do so.

I then tried the script and it worked a treat - thanks for pointing me in the right direction Qie! :D
DQ Darwin
Registered User
Join date: 18 Jan 2008
Posts: 9
Scripting
01-24-2008 07:03
I have tried to copy/paste code into new script but keep getting last line errors. What am I doing wrong.

Help appreciated thanks

DQ
Nika Talaj
now you see her ...
Join date: 2 Jan 2007
Posts: 5,449
02-21-2008 10:01
From: Haravikk Mistral
I'm now using this on doors to "teleport" to a skybox (so when you 'open' the door with right-click you end up in a skybox but don't really know unless you're paying close attention). ...This system works by rezzing an object with this script in it (plus some permission check using llSameGroup(id)), when the object is sat on, if the avatar has permission to move it informs the controller which rezzes a new door, and then goes invisible and moves.
Haravikk, your first sentence seems to imply that the avatar just right-clicks on the door and *poof* teleports, without having to sit.

But the end sentence seems to imply that the avatar still has to sit to teleport, yes?

If not, if you just magically whisk the avatar away without them sitting, how are you doing that?

Thanks!
.
Hewee Zetkin
Registered User
Join date: 20 Jul 2006
Posts: 2,702
02-21-2008 10:58
From: Nika Talaj
Haravikk, your first sentence seems to imply that the avatar just right-clicks on the door and *poof* teleports, without having to sit.

But the end sentence seems to imply that the avatar still has to sit to teleport, yes?

More than likely this is a case of the default left-click behavior for the object being set to 'sit'. That means a single primary click WILL sit the avatar, which can then detect the sit and teleport the avatar immediately. If an llUnSit() is done immediately after the move, it may not even appear the avatar sits at all (though the sit animation may play momentarily even if the script stops it).
Nika Talaj
now you see her ...
Join date: 2 Jan 2007
Posts: 5,449
02-21-2008 11:21
From: Hewee Zetkin
More than likely this is a case of the default left-click behavior for the object being set to 'sit'.
Oh thanks!

But now I've been reading both LSL wikis, and I can't seem to find how to set the left-click behvior for an object to anything, let alone sit. How do I do that?

*feeling stupid*
.
Atashi Toshihiko
Frequently Befuddled
Join date: 7 Dec 2006
Posts: 1,423
02-21-2008 11:25
From: Nika Talaj
Oh thanks!

But now I've been reading both LSL wikis, and I can't seem to find how to set the left-click behvior for an object to anything, let alone sit. How do I do that?

*feeling stupid*
.


Use the first (general) tab in the edit floater. You cannot set the default left-click behavior from within a script.

-Atashi
_____________________
Visit Atashi's Art and Oddities Store and the Waikiti Motor Works at beautiful Waikiti.
Hewee Zetkin
Registered User
Join date: 20 Jul 2006
Posts: 2,702
02-21-2008 11:26
From: Nika Talaj
But now I've been reading both LSL wikis, and I can't seem to find how to set the left-click behvior for an object to anything, let alone sit. How do I do that?

Oh. Sorry. Don't feel stupid. You can't do it via script. You have to do it in the bottom of the Edit window (General tab, I believe). And BECAUSE you can't do it from a script, if it is an object that is rezzed by script the option has to be set before the object is taken and stuffed into the rezzing object's inventory.
Nika Talaj
now you see her ...
Join date: 2 Jan 2007
Posts: 5,449
02-21-2008 11:43
Omg!!! *dizzy with power*

Thanks guys!
.
Nika Talaj
now you see her ...
Join date: 2 Jan 2007
Posts: 5,449
04-02-2008 13:42
The LSL wiki has a note in it saying the Warppos doesn't work in Havok4, however, my little warppos script is working fine over its normal 1K distances. Does anyone know if warppos behavior is any different in Havok4?

I didn't see anything in the release notes about it.
.
Ordinal Malaprop
really very ordinary
Join date: 9 Sep 2005
Posts: 4,607
04-02-2008 13:50
Seems to work fine for me.
_____________________
http://ordinalmalaprop.com/forum/ - visit Ordinal's Scripting Colloquium for scripting discussion with actual working BBCode!

http://ordinalmalaprop.com/engine/ - An Engine Fit For My Proceeding, my Aethernet Journal

http://www.flickr.com/groups/slgriefbuild/ - Second Life Griefbuild Digest, pictures of horrible ad griefing and land spam, and the naming of names
Monica Balut
Beam-Me
Join date: 18 Feb 2007
Posts: 311
04-02-2008 15:30
and for me
Rez Gray
Registered User
Join date: 2 Apr 2007
Posts: 23
04-05-2008 18:37
You can now warppos up to 4096m, but the warppos function will need to be modded.
Right now, even in a nearly empty script plotting a jump from 0 to 4096 (or even more than 2k?) will cause a stackheap.
Tyken Hightower
Automagical
Join date: 15 Feb 2006
Posts: 472
04-05-2008 18:45
From: Rez Gray
You can now warppos up to 4096m, but the warppos function will need to be modded.
Right now, even in a nearly empty script plotting a jump from 0 to 4096 (or even more than 2k?) will cause a stackheap.

Yes, this is why the default version includes a 1km limit. In a single script by itself, though, you should be able to crank it up to a max of around 4km with a couple extra hack bits thrown in, or you could always do the safe thing and loop the function itself, since it's rather fast anyway.
_____________________
Mythrandal Infinity
Registered User
Join date: 5 Mar 2008
Posts: 1
just my method
04-10-2008 18:30
just thought i;d post my method , works fine in the latest havok all ya half to do is pass it a vector as a string via a say command of some sort and off it goes

vector end;
vector current;
vector pos;
string firstchar = "";
integer bool = 1;
integer count = 1;
default
{
state_entry()
{
if (bool == 2)
{
state moveing;

}
llListen (-59963, "",NULL_KEY,"";);
}

listen( integer channel, string name, key id, string message)
{
current = llGetPos();
string firstchar = llGetSubString(message, 0, 0);
if (firstchar == "<";)
{
list msg = llCSV2List(message);
end = (vector)llList2String(msg, 0);

float distance = llVecMag(current - end);
float increments = distance/.2;

vector step = (end - current)/increments;

pos = current + step;
if (current != end)
{
state moveing;
}
}
}
}
state moveing
{
state_entry()
{
if (llVecMag(current- end) > .01)
{

float distance = llVecMag(current - end);
float increments = distance/.2;

vector step = (end - current)/increments;

pos = current + step;

llSetPos(pos);
current = llGetPos();
bool = 2;
state default;
}
}
}
Jesse Barnett
500,000 scoville units
Join date: 21 May 2006
Posts: 4,160
04-10-2008 18:47
Asked in another thread about the new limits. All you have to do is call warpPos multiple times with each set having the original max of 1000 meters like so:

CODE
vector destpos = <66, 60, 4095 >;// The location the av will be teleported to.

warpPos(vector destpos)
{
//with a little pokeing by Strife, and a bit more
//munging by Talarus Luan
//Final cleanup by Keknehv Psaltery
//and of course Jesse Barnett got to jump in here
//and made it work up to 4096 meters
//Fail safe removed
// Compute the number of jumps necessary
integer jumps = (integer) (llVecDist(destpos, llGetPos()) / 10.0) + 1;
if (jumps > 100)
jumps = 100; // 1km should be plenty
list rules =[PRIM_POSITION, destpos];
integer count = 1;
while ((count = count << 1) < jumps)
rules = (rules =[]) + rules + rules;
llSetPrimitiveParams(rules + llList2List(rules, (count - jumps) << 1, count));
}

default {
state_entry() {
llSetText("Touch to teleport", <1, 1, 1 >, 1);
llSitTarget(<0, 0, 0 >, ZERO_ROTATION);
}

changed(integer change) {
if (change & CHANGED_LINK) {
integer jumps = (integer) (llVecDist(destpos, llGetPos()) / 10.0) + 1;
if (jumps > 100) {
integer hops = jumps / 100;
while (hops > 0) {
hops--;
warpPos(destpos);
}
}
warpPos(destpos);
llSleep(0.5);
llDie();
}
}
}
_____________________
I (who is a she not a he) reserve the right to exercise selective comprehension of the OP's question at anytime.
From: someone
I am still around, just no longer here. See you across the aisle. Hope LL burns in hell for archiving this forum
Talarus Luan
Ancient Archaean Dragon
Join date: 18 Mar 2006
Posts: 4,831
04-10-2008 20:45
I made a module version a bit ago which works for the new H4 limits:

http://wiki.secondlife.com/wiki/User:Talarus_Luan/WarpPosModule

Enjoy!
1 2 3 4 5