Welcome to the Second Life Forums Archive

These forums are CLOSED. Please visit the new forums HERE

detect the anti movement device how?

RacerX Gullwing
Magic Rabbit
Join date: 18 Jun 2004
Posts: 371
01-21-2008 05:15
tried warpos befor very disorientating for the spectators. Ive been doing this 3 years now. Tried a lot of stuff already llsetpos seems to be the best.
_____________________
Jesse Barnett
500,000 scoville units
Join date: 21 May 2006
Posts: 4,160
01-21-2008 20:46
From: RacerX Gullwing
so your saying my script just needs one of these in there because its never getting where its going?
vect1 =posfinal;
while (llVecDist(llGetPos(), vect1) > 0.1) llSetPos(vect1);

ok ill try that. Right needs an off switch good idea on having the scarf turn it on
I find it hard to believe the problem was that simple I was thinking the next position would cancel the previous one but your right it never starts the next one till it hits the one its on. wish it did. Might be nice to figure out a way to cancel the one its on if it gets newer spot to go .


When you are doing a direct comparison like while(llGetPos() != <123.4567,123.4567,123.4567>;), every once in a great while the script can loop, fighting to match to the smallest decimal point. Back, forth, up, down etc...... It is a little friendlier to use; while (llVecDist(llGetPos(), vect1) > 0.1) which says that as long as your within 1/10 of a meter, everything is cool.

Very interested in this problem now and would like some feedback if this fixes it or you encounter the problem again. Especially if you can come up with the name of an offending object.

And agree that warpPos wouldn't work for this. I use the movement script in my bubble TP. You get to enjoy the movement and see what is happening around you.
_____________________
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
RacerX Gullwing
Magic Rabbit
Join date: 18 Jun 2004
Posts: 371
01-26-2008 17:10
Well race was today. No benches got stuck. So maybe that fixed it. Thanks everyone.
_____________________
Talarus Luan
Ancient Archaean Dragon
Join date: 18 Mar 2006
Posts: 4,831
01-27-2008 10:25
Yes, that is a common problem with continuous non-physical movement, and you have the right solution to it, RacerX. :) *wavies*~~
RacerX Gullwing
Magic Rabbit
Join date: 18 Jun 2004
Posts: 371
02-02-2008 21:06
Well busy day at the track today. 4 races and Guess what? Stands got stuck again. the only way to get them moving was editing the script and re saving it reseting them didn't even work and a couple times they didn't even work after that. So whats that leave? Oh and not sure if this is unrelated but we were at near capacity (40) in this class 4 sim and the sim crashed. When we came back, Started the race over and none of the stands moved. ( Thinking like maybe the sim decided they were the problem and shut them off? )Till I selected the script inside and re-saved it.

I think next week I'm going to put a script in them that emails me
the names of the people on the stuck benches if I have to manually restart them. I should save the clues. Maybe I'll find a pattern there.

Anyone else have any ideas I'm going to post the latest revisions.

This goes in the thing the snails wear.
__________________________________________
integer blue = -983565;

default
{
state_entry()
{
llListen(blue,"stands2","","yes";);
}
on_rez(integer pop)
{
llRegionSay(blue,(string)(llGetPos()));
}

listen(integer total_number,string name,key id,string message)
{
if(message =="yes";)
{
llRegionSay(blue,(string)(llGetPos()));
}
}
}

_____________________________________________________________

this goes in the bench

____________________________________________________________

vector pos;
integer heardit;
float Xtra_dist_y = 1.511;// minus
vector vect1;
integer blue = -983565;


default
{
state_entry()
{
llListen(blue,"snail2_blue","","";);
heardit= 0;
llSetTimerEvent(1.5);
}
touch(integer pop)
{
llResetScript();
}

timer()
{
llRegionSay(blue,"yes";);
heardit = heardit +1;
if(heardit >= 3)
{
vect1 = <10.210,211.402,153.737>;
while (llVecDist(llGetPos(), vect1) > 0.1) llSetPos(vect1);
llSetTimerEvent(0);
state off;
}
}
listen(integer tn,string name,key id,string message)
{
if(name == "snail2_blue";)
{
heardit = 0;
pos = (vector)((string)message);
vector ypos = llGetPos();
float theypos = ypos.y;
vector posfinal = <pos.x,theypos,(pos.z + 3.0)>;
if(posfinal.x<= 5)
{
posfinal.x= 6;
}
if(posfinal.x> 188 &&posfinal.x<= 249)
{
posfinal.y = 235 - Xtra_dist_y;
}
else if(posfinal.x> 250)
{
posfinal.x= 250;
}
else
{
posfinal.y = 212.741 - Xtra_dist_y;
}
if(posfinal.z<= 50)
{
posfinal.z = 50;
}
if(posfinal.z>= 750)
{
posfinal.z = 750;
}
vect1 =posfinal;
while (llVecDist(llGetPos(), vect1) > 0.1) llSetPos(vect1);
}
}

}

state off
{
state_entry()
{
llListen(blue,"snail2_blue","","";);
llOwnerSay("off";);
}
listen(integer tn,string name,key id,string message)
{
if(name == "snail2_blue";)
{
state default;
}
}
}


Only other thing I can think of is to give it even more leeway then.
Think ill let it round it off to the nearest 1.0 so give or take a meter.
If that doesn't fix it definetly something else wrong not a rounding problem.
_____________________
Jesse Barnett
500,000 scoville units
Join date: 21 May 2006
Posts: 4,160
02-03-2008 12:34
No problems with this part of it:

while (llVecDist(llGetPos(), vect1) > 0.1)

I simplified it down to this as a test:

CODE

vector pos;
integer heardit;
float Xtra_dist_y = 1.511; // minus
vector vect1;
integer blue = -983565;

default {
state_entry() {
llSetObjectName("stands2");
vect1 = llGetPos();
llListen(blue, "snail2_blue", "", "");
heardit = 0;
llSetTimerEvent(1.5);
}
touch(integer pop) {
llResetScript();
}

timer() {
llRegionSay(blue, "yes");
heardit = heardit + 1;
if (heardit >= 3) {
while (llVecDist(llGetPos(), vect1) > 0.1)
llSetPos(vect1);
llSetTimerEvent(0);
state off;
}
}
listen(integer tn, string name, key id, string message) {
if (name == "snail2_blue") {
heardit = 0;
pos = (vector) ((string) message);
pos.x = pos.x + 2.0;
while (llVecDist(llGetPos(), pos) > 0.1)
llSetPos(pos);
}
}

}

state off {
state_entry() {
llListen(blue, "snail2_blue", "", "");
llOwnerSay("off");
}
listen(integer tn, string name, key id, string message) {
if (name == "snail2_blue") {
state default;
}
}
}


and have the snail script in an object with this script:
CODE
vector start_pos;
vector pos_up;
vector pos;
integer on = 0;

up()
{
pos = llGetPos();
while (llVecDist(llGetPos(), pos_up) > 0.1) {
pos.z = pos.z + 0.2;
llSetPos(pos);
}
down();
}
down()
{
pos = llGetPos();
while (llVecDist(llGetPos(), start_pos) > 0.1) {
pos.z = pos.z - 0.2;
llSetPos(pos);
}
up();
}

default {
state_entry() {
start_pos = llGetPos();
start_pos.z = 24.0;
pos_up = start_pos;
pos_up.z = start_pos.z + 100;
}
touch_start(integer n) {
if (on) {
on = 0;
up();
}
else {
on = 1;
while (llVecDist(llGetPos(), start_pos) > 0.1) {
llSetPos(start_pos);
}
}
}
}

It has been going up and down for 6 hours now so...................................... Going to try it with your whole script now and see if it breaks after a certain amount of time. And then if that doesn't work, I'll just keep throwing variables at it until it DOES break.
_____________________
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
RacerX Gullwing
Magic Rabbit
Join date: 18 Jun 2004
Posts: 371
02-04-2008 18:40
Well never had one get stuck with no one on it.
Try adding 7 poseballs to the prim and some test subjects....
A little harder to run that test, See thats part of my problem.


Maybe SL isn't meant to be able to handle 40 moving avatars
in a sim at one time 30 of them riding things and have scripts actually function?
Be a good New feature suggestion maybe? Thats sarcasm by the way.
maybe havok 4 or mono will fix the problem.
_____________________
Jesse Barnett
500,000 scoville units
Join date: 21 May 2006
Posts: 4,160
02-04-2008 19:13
From: RacerX Gullwing
40 moving avatars
in a sim at one time 30 of them riding things and have scripts actually function?

Yep, now that would definitely be throwing variables at it.............

Interesting conditions to try to replicate in Aditi in a Hovk 1 sim. Only have 3 alts, maybe............. a buttload of running scripts and flashing textures.....................

If a person could ever come up with a test case then you could try it in Havok 4 and a MONO sim.
_____________________
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
1 2