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-19-2008 22:03
Hi I host the Giant Snail Races with the only stands that actually follow the racers in the known universe. They seat about 7 avatars each and use llSetPos() to move them every second and a half. They sometimes get stuck because someone on them is wearing some kind of anti movement device. I tell people take off any anti push devices, but some people are just not aware that they have one of those on, probably buried in some multi gadget they haven't read all the instructions for.
I had someone today that had one on, Was the only person on the bench and it would move once then get stuck. When I told the person she must have a no push device on she said no she didn't. Is there anyway to detect the name of the device that's causing the problem so I could be more specific. Or in the case of multiple avatars on the bench at least
figure out which one is wearing the problem device so I can detect and warn them that they are the problem before I unseat them.
Would that show up in the sim debugging a top colider? Non physical so I suspect not.
I'm thinking I could just go down the line unseat them all one at a time till it starts moving
but that isn't very nice to the people that weren't causing the problem. I don't have that kind of time when the race has started to monitor that either.
_____________________
Void Singer
Int vSelf = Sing(void);
Join date: 24 Sep 2005
Posts: 6,973
01-19-2008 23:05
I'm curious how you're moving the bench if it's being affected by a no-push device
_____________________
|
| . "Cat-Like Typing Detected"
| . This post may contain errors in logic, spelling, and
| . grammar known to the SL populace to cause confusion
|
| - Please Use PHP tags when posting scripts/code, Thanks.
| - Can't See PHP or URL Tags Correctly? Check Out This Link...
| -
Hewee Zetkin
Registered User
Join date: 20 Jul 2006
Posts: 2,702
01-19-2008 23:06
Anti-push devices would be a factor if you used physical movement, including vehicle functions. But if you are using llSetPos() (or other non-physical movement), they won't do a darn thing. Most likely this is a fault of your own script. I'd do some careful debugging and stress testing before accusing your riders.
Jesse Barnett
500,000 scoville units
Join date: 21 May 2006
Posts: 4,160
01-20-2008 06:07
COOL!! One of the true script wizards!!! Hey RacerX!!!

Now that my moment of levity has passed......... :p

Not sure how they would show up in Top Scripts but you could do a search in OnRez etc for anti-push and build up a list of the devices. Then use that list and see if any show up.

If you haven't already, then you could also put the list on either a sign or hand out notecards automatically to the people seated on the bench that stops moving. Something along the lines of................

"Hey, I stopped moving!. Sorry about that, but please check if you are wearing any of these items

    and kindly remove them so that we can catch up to the race"
_____________________
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
Qie Niangao
Coin-operated
Join date: 24 May 2006
Posts: 7,138
01-20-2008 08:53
From: RacerX Gullwing
I'm thinking I could just go down the line unseat them all one at a time till it starts moving but that isn't very nice to the people that weren't causing the problem. I don't have that kind of time when the race has started to monitor that either.
Hardly a solution but you could have the audience do a test lap before the race. :D

But I'm curious, too: Do we know the underlying mechanism used by these "anti-movement" devices, such that they can interfere with the motion of the whole seated linkset? (I have a guess that I could test--but it would be griefer paradise if it's correct.) Just wondering if the seats could themselves defeat that mechanism with timely calls to... well, never mind :o )
_____________________
Archived for Your Protection
RacerX Gullwing
Magic Rabbit
Join date: 18 Jun 2004
Posts: 371
01-20-2008 09:44
Okay here's the script thats in the bench I changed the channels to avoid someone messing with me the script in the scarfs is similar and posted below this one.
Oh and okay maybe its not really an anti push it's actually some kind of non movement thing or it moves them back after there moved but does it faster than my script.
my script is a little jerky but low lag. Oh and the time I was talking about was pre race and only a few people in the sim yet and only me and her were on the bench so lag had nothing to do with it.


vector pos;
integer heardit;
float Xtra_dist_y = 1.511;// minus
default
{
state_entry()
{
llListen(45670,"snail2_blue","","";);

llSetTimerEvent(1.5);
}
touch(integer pop)
{
llResetScript();
}

timer()
{
//sends it back if no scarf is heard
llRegionSay(86765,"yes";);
heardit = heardit +1;
if(heardit >= 3){
do{llSetPos(<10.210,211.402,153.737>;);}while(llGetPos() != <10.210,211.402,153.737>;);

}
}
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;
}
do{llSetPos(posfinal);}while(llGetPos() != posfinal);
}

}}



_____________________________________________________________________
reply script

default
{
state_entry()
{
llListen(86765,"stands5","","yes";);

}

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

llRegionSay(45670,(string)(llGetPos()));

}
}
}
_____________________
Atashi Toshihiko
Frequently Befuddled
Join date: 7 Dec 2006
Posts: 1,423
01-20-2008 10:47
Maybe someone is touching the bench, causing the script to reset?

In your touch event, change the reset script line to:
if(llDetectedKey(0) == llGetOwner()) llResetScript();

That will make it so nobody but you can reset the script by touching the bench.

-Atashi
_____________________
Visit Atashi's Art and Oddities Store and the Waikiti Motor Works at beautiful Waikiti.
RacerX Gullwing
Magic Rabbit
Join date: 18 Jun 2004
Posts: 371
01-20-2008 10:55
see thing is i may be across the sim so i made it so anyone can reset it but its actually set to sit on if you touch it you'd have to right click on it and choose touch to make it reset. and if you try to edit it. It keeps moving so not like there stopping it by grabbing it either. Just stops when some people get on usally telling people to turn off the anti push things will get it moving again I guess what i need is the list of things to pass out that will stop the stands.
_____________________
Jesse Barnett
500,000 scoville units
Join date: 21 May 2006
Posts: 4,160
01-20-2008 11:02
From: Atashi Toshihiko
Maybe someone is touching the bench, causing the script to reset?

In your touch event, change the reset script line to:
if(llDetectedKey(0) == llGetOwner()) llResetScript();

That will make it so nobody but you can reset the script by touching the bench.

-Atashi


Even if it was reset, the script would still go back to processing the listens and try to move to the desired location. So llReset wouldn't be the root problem here.
_____________________
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
Jesse Barnett
500,000 scoville units
Join date: 21 May 2006
Posts: 4,160
01-20-2008 11:13
I'm have been trying to stop this striped down script:

CODE

vector old_pos;
vector new_pos;
float offset = 100;

default {
state_entry()
{
old_pos = llGetPos();
llSitTarget(<0,0,0.5>,ZERO_ROTATION);
}
changed(integer change) {
if (change && CHANGED_LINK) {
if(llAvatarOnSitTarget() != NULL_KEY){
new_pos = llGetPos();
new_pos.z = new_pos.z + offset;
do {
llSetPos(new_pos);
} while(llVecDist(llGetPos(), new_pos) > 0.01);
}
else{
do {
llSetPos(old_pos);
} while(llVecDist(llGetPos(), old_pos) > 0.01);
}
}
}
}

Neither an older MystiTool movelock or an old anti-push script had an affect on it.
Tried something particularly nasty:

CODE

//TESTING PURPOSES ONLY
//Nasty, bad, vile script. please don't use
vector pos;

default {
state_entry() {
pos = llGetPos();
llSetTimerEvent(0.01);
}
timer() {
if (llVecDist(llGetPos(), pos) > 0.01) {
llSetPos(pos);
llSetPos(pos);
llSetPos(pos);
llSetPos(pos);
llSetPos(pos);
llSetPos(pos);
llSetPos(pos);
llSetPos(pos);
llSetPos(pos);
}
}
}

Now that one definitely slows it down but even though it jumps up and down it will still EVENTUALLY arrive at it's destination. But it must be something more polished and along the same lines
_____________________
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
Jana Kamachi
Registered User
Join date: 19 Apr 2007
Posts: 111
01-20-2008 11:39
When it does stop, does it happen to be in the same place every time.
Void Singer
Int vSelf = Sing(void);
Join date: 24 Sep 2005
Posts: 6,973
01-20-2008 11:42
::wonders about qie's idea::

I can't think of any known funcitons that as an attachment would affect the root prim of a seated Av unless they specifically targeted it (which I'm not sure they could), which would be weird to say the least.

I so have an idea, but it would have to be very specificlly coded, and may expose a security hole, so I'll test and post back.
_____________________
|
| . "Cat-Like Typing Detected"
| . This post may contain errors in logic, spelling, and
| . grammar known to the SL populace to cause confusion
|
| - Please Use PHP tags when posting scripts/code, Thanks.
| - Can't See PHP or URL Tags Correctly? Check Out This Link...
| -
Pale Spectre
Registered User
Join date: 2 Sep 2005
Posts: 586
01-20-2008 14:05
From: Jesse Barnett
Now that one definitely slows it down but even though it jumps up and down it will still EVENTUALLY arrive at it's destination. But it must be something more polished and along the same lines
This is a 'classic' anti-push script...

RacerX Gullwing
Magic Rabbit
Join date: 18 Jun 2004
Posts: 371
01-20-2008 14:12
Not a specific place no. In fact reseting the script made it move one more time before it stopped again. I tried the above linked script it has no effect on my stands.
_____________________
Jana Kamachi
Registered User
Join date: 19 Apr 2007
Posts: 111
01-20-2008 16:17
That script would never affect your seat. llSetPos cannot be affected by any "no-move" script. Its almost certainly a flaw in your script, prbly with the timer and minute amounts of lag.
Day Oh
Registered User
Join date: 3 Feb 2007
Posts: 1,257
01-20-2008 16:39
Puzzling... Have you tested whether somehow the energy is being depleted?
_____________________
Hewee Zetkin
Registered User
Join date: 20 Jul 2006
Posts: 2,702
01-20-2008 16:43
Non-physical movement doesn't depend on energy. Non-physical movement functions impose script delay instead. So that shouldn't be the problem.
Jesse Barnett
500,000 scoville units
Join date: 21 May 2006
Posts: 4,160
01-20-2008 16:53
Got it!!!!!!
Same mistake I made the other day.

You have infinite loops in the "while" tests!

You can see the problem with the code you posted here. Change this one bit:

CODE

if (heardit >= 3) {
do {
llSetPos(<10.210, 211.402, 153.737 >);
llOwnerSay("working");
} while (llGetPos() != <10.210, 211.402, 153.737 >);


If you sit on that prim and set the script to running then the timer will trip out and start it moving. When it reaches it's destination you will see that it continues to "work" anyways.

Need to change the script to this:

CODE

vector pos;
vector home_pos = <73, 74, 620>;
integer heardit;
float Xtra_dist_y = 1.511; // minus
default {
state_entry() {
llListen(45670, "snail2_blue", "", "");

llSetTimerEvent(1.5);
}
touch(integer pop) {
llResetScript();
}

timer() {
//sends it back if no scarf is heard
llRegionSay(86765, "yes");
heardit = heardit + 1;
if (heardit >= 3) {
while ( llVecDist(llGetPos(), home_pos) > 0.01 ){
llSetPos(home_pos);
}
}
}
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;
}
while ( llVecDist(llGetPos(), posfinal) > 0.01){
llSetPos(posfinal);
}
}

}
}
_____________________
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
Hewee Zetkin
Registered User
Join date: 20 Jul 2006
Posts: 2,702
01-20-2008 17:03
Ahh. So it was testing equality on floating point values. eh? That can be a recipe for disaster. Makes sense. Remember there is always error associated with floating point arithmetic, folks.

Good find Jesse. :-)
Jesse Barnett
500,000 scoville units
Join date: 21 May 2006
Posts: 4,160
01-20-2008 17:16
From: Hewee Zetkin
Ahh. So it was testing equality on floating point values. eh? That can be a recipe for disaster. Makes sense. Remember there is always error associated with floating point arithmetic, folks.

Good find Jesse. :-)

Actually it is bugging the heck out of me. What RacerX was doing, I have done succesfully in the past. I ran into that problem the other day in the monkey climbing thread. What I posted had always worked but found it is now an infinite loop. Seems there is a change to how "do" is being treated. This works also without the "do":

CODE

vector pos;
vector home_pos = <10.210, 211.402, 153.737 >;
integer heardit;
float Xtra_dist_y = 1.511; // minus
default {
state_entry() {
llListen(45670, "snail2_blue", "", "");
llSetTimerEvent(1.5);
}
touch(integer pop) {
llResetScript();
}
timer() {
//sends it back if no scarf is heard
llRegionSay(86765, "yes");
heardit = heardit + 1;
if (heardit >= 3) {
while (llGetPos() != home_pos) {
llSetPos(home_pos);
}
}
}
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;
}
while (llGetPos() != posfinal) {
llSetPos(posfinal);
}
}
}
}

Can anyone else confirm a change? If anyone can, then I'll do a jira on it.
_____________________
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
Hewee Zetkin
Registered User
Join date: 20 Jul 2006
Posts: 2,702
01-20-2008 17:20
Huh. Can you use the epsilon closeness test, not the exact comparison, with the do-while loop, or does that become an infinite loop as well?
Jesse Barnett
500,000 scoville units
Join date: 21 May 2006
Posts: 4,160
01-20-2008 18:21
Crap!!!!! Wish I could go back and delete all of the messages now :o
grrrrrrrrrr "do" still executes one time before testing the while :(
NO INFINITE LOOP!
"while" w/o "do" doesn't execute at all unless the test is true.
Sorry!

I would still try the script as I posted it without the "do" to see if it helps. Plus, the way it is setup now; 24 hours per day, race or no race, the benches are trying to move home once every 1.5 seconds. Doing away with the "do" will stop that. Might want to make it so that the bench scripts are turned off and on by the scarfs also or make it so the timer is only started if they recieve a "Race is on" message eyc..............
_____________________
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
Jesse Barnett
500,000 scoville units
Join date: 21 May 2006
Posts: 4,160
01-20-2008 18:54
Newly acquired Rule #3: Do not debug code after recieving a sampler case of Flying Dog Ale as a gift :rolleyes:
_____________________
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-20-2008 20:17
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 .
_____________________
Squirrel Wood
Nuteater. Beware!
Join date: 14 Jun 2006
Posts: 471
01-20-2008 23:48
I would suggest using warppos for the movement or llVectDist() to compare how close you are to your target coordinates.

And since you are dealing with floating point variables you will want to do checks like... while (llvectDist(llGetPos(),targetPos) > 0.01) { do stuff }
1 2