Jump to content

Scripts behaving different


Kayaker Magic
 Share

You are about to reply to a thread that has been inactive for 4304 days.

Please take a moment to consider if this thread is worth bumping.

Recommended Posts

  A whole bunch of scripts that I wrote a long time ago are missbehaving today. Has there been a server change recently (PathFinding?) that has caused problems for anybody else?

  I have a bunch of scripted objects that find the seated avatar and move/rotate him/her around like a child prim. I do this using the same technique described in the UpdateSitTarget function in the Wiki. Every build I have that uses this techique started working poorly yesterday. (Although I haven't looked lately, it could have started failing earlier). It still sort of works, but it is VERY SLOW. Especially at rotating the avatar, and even just moving the avatar sometimes results in the avatar moved up or down far away from where I intended the move to go.

Link to comment
Share on other sites

How is the sim behaving?   Usually when I've experienced problems like it, either moving avatars or child prims around, there' s been something happening elsewhere on the sim  to slow everything down (and I don't even want to think about what happened when we tried putting our a demo item on the Gor Hub that uses that technique to move round seated avatars).

Link to comment
Share on other sites

I tried moving to a nearly empty sandbox, same effect. I tried converting the prim from physical to non-physical, same effect. I tried it in an old reliable version of Impudence, same problem. Siny new version of Firestorm, same problem. I had a friend watch me and tell me if my avatar was turning when it was supposed to, she saw the same problem.

I have some indication that the effect is not there when the avatar is close to the root prim, and starts up when he/she is more than 10? meters away from the root prim. So it may have been a change in the linkability rules that only effects avatars. (I have some off-sim objects that still work fine 50 meters from their root prim).

Link to comment
Share on other sites

I wrote the following script to demonstrate the problem. Create a standard plywood box. Put this script in it. Sit on it. Your avatar should rise up into the air turning around. But at about 21 meters, you stop moving or rotating. The get operation reports the correct position but you don't appear to move or rotate. Every 10 meters or so you do suddenly move and rotate. Sometimes there is a long delay when you should return to 1 meter. I tried this in Imprudence 1.3.2 (May 17 2011) and in Firestorm 4.2.2.29837 (yesterday) and saw the same thing. I have a dozen scripts and 1000 products sold that depended on this working! What happened?!

vector height=<0,0,1>;rotation avrot=ZERO_ROTATION;rotation thirty;default{    state_entry()    {        llOwnerSay("Sit on me");        llSitTarget(<0,0,1>,avrot);        thirty=llEuler2Rot(<0,0,30>*DEG_TO_RAD);    }    changed(integer param)    {        height.z=0.0;        if (llAvatarOnSitTarget()==NULL_KEY)            llSetTimerEvent(0);        else            llSetTimerEvent(0.333);    }    timer()    {        avrot *= thirty;            height.z += 1.0;            if (height.z>50.00)                 height.z = 1.0;        llSetLinkPrimitiveParamsFast(2,[PRIM_POSITION,height,PRIM_ROTATION,avrot]);        llOwnerSay((string)(height.z));        float dist = llVecDist(llGetPos(),llList2Vector(llGetLinkPrimitiveParams(2,[PRIM_POSITION]),0));        if (llFabs(dist-llVecMag(height))>0.5)            llOwnerSay("FAILED!");    }}

 

Link to comment
Share on other sites

Same happens on Firestorm. Made tests.

1st changed the script so it works in a linked prim:

vector height=<0,0,1>;rotation avrot=ZERO_ROTATION;rotation thirty;integer nop;vector offset;default{    state_entry()    {        llOwnerSay("Sit on me");        llSitTarget(<0,0,1>,avrot);        thirty=llEuler2Rot(<0,0,30>*DEG_TO_RAD);    }    changed(integer param)    {        offset=llGetPos()-llGetRootPosition();        height.z = 0.0;        if (llAvatarOnSitTarget()==NULL_KEY)            llSetTimerEvent(0);        else {            nop=llGetNumberOfPrims();            llSetTimerEvent(0.333);        }    }    timer()    {        avrot *= thirty;            height.z += 1.0;            if (height.z>50.00)                 height.z = 1.0;        llSetLinkPrimitiveParamsFast(nop,[PRIM_POSITION,height+offset,PRIM_ROTATION,avrot]);        llOwnerSay((string)(height.z));        float dist = llVecDist(llGetPos(),llList2Vector(llGetLinkPrimitiveParams(nop,[PRIM_POSITION])+offset,0));        if (llFabs(dist-llVecMag(height))>0.5)            llOwnerSay("FAILED!");    }}

Same behaviour, as expected.
Taking out the rotation doesnt change anything for me.

Linked it to another prim so the prim with the script is the child. - no changes, at 25m it becomes jumpy
Moved the root prim away 25m - all still linked. - script works up to 30m instead of 25m now
I resized the root prim to 50x50m. - script works perfect now

I noticed strange behaviour b4 - once. But since it was all linked to a larger structure and all worked fine I didn't investigate.

Conclusion: moving avatars with that method works up to a distance of 25m - if the prim is linked to a larger structure the range increases?
I once noticed a range of 500m but that was a few server versions ago.

Link to comment
Share on other sites

Yes, I can confirm that.

A transportation device working that way that unsits the avatars 50m above - always succeeds, but the camera shows no movement over 25m. When the movement finishes avatar and camera snap into the position they are expected at.

For me it's no difference if the camera is default or not. (only tested on Firestorm yet)

But that happens only if unlinked. If transportation prim is linked (to something big) all works fine.

Link to comment
Share on other sites

You guys are the greatest! I was able to get my scripts to work again!

I submitted a JIRA to LL, but they were unable to reproduce the bug. Even if they could, I would have to wait until the next server roll-out for a fix. Then Nova noticed that the problem went away if the build was large enough. I only have one prim in my build, it was already invisible and phantom while the avatar was sitting on it, so I changed the size to <60,60,60> during that time, and my script started working again! Thanks a bunch!

Well, it was not quite that easy, my prim was physical and when I made it that big llMoveToTarget ran out of energy and the whole thing started falling into the ground. I wrote this a long time ago and only made the silly thing physical to get smooth motion. I have been meaning to convert it to non-physical llSetKeyframedMotion. So after I did THAT, then my script started working the way I wanted it to.

Thanks for your help!

 

Link to comment
Share on other sites

You are about to reply to a thread that has been inactive for 4304 days.

Please take a moment to consider if this thread is worth bumping.

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
 Share

×
×
  • Create New...