vehicle sim crossings
|
Caden Lynagh
Registered User
Join date: 13 Sep 2007
Posts: 13
|
11-13-2009 10:20
I understand there are lots of issues with sim crossings and vehicles. I have not been able to find any info on what I am experiencing with mine.
My vehicle, a bicycle, has the avatar pedaling while the vehicle is moving. When I cross sim boundaries I get a script error. Something like "agent not found, can't run animation". The thing is, everything seems to work fine. The bike keeps moving, avatar is seated and the animation is playing along. The script error notification then disappears within a few seconds.
Is this normal behavior? Well, it isn't normal, but does this fall under any known bug? Is there a fix?
|
Rolig Loon
Not as dumb as I look
Join date: 22 Mar 2007
Posts: 2,482
|
11-13-2009 10:56
Add that to the long list of things that hiccup as SL passes you from one server to another across a sim boundary. It's normal, and there's not a lot you can do about it. You may find that the problem is diminished if you uncheck the Mono box when you compile the script, since it takes SL a bit longer to hand off Mono scripts across a boundary. Otherwise, just slow down as you cross, just as you do when you are walking or flying.
_____________________
It's hard to tell gender from names around here but if you care, Rolig = she. And I exist only in SL, so don't ask....  Look for my work in XStreetSL at 
|
Meade Paravane
Hedgehog
Join date: 21 Nov 2006
Posts: 4,845
|
11-13-2009 11:03
From: Caden Lynagh When I cross sim boundaries I get a script error. Something like "agent not found, can't run animation".... In the changed event, are you just looking for CHANGED_LINK happening? When you cross a sim border, changed will also fire for CHANGED_REGION.. edit: should be something like... changed (integer mask) { if (mask & CHANGED_LINK) { // do start/stop anims stuff } }
_____________________
Tired of shouting clubs and lucky chairs? Vote for llParcelSay!!! - Go here: http://jira.secondlife.com/browse/SVC-1224- If you see "if you were logged in.." on the left, click it and log in - Click the "Vote for it" link on the left
|
Caden Lynagh
Registered User
Join date: 13 Sep 2007
Posts: 13
|
11-19-2009 11:51
From: Meade Paravane In the changed event, are you just looking for CHANGED_LINK happening? When you cross a sim border, changed will also fire for CHANGED_REGION..
edit: should be something like...
changed (integer mask) { if (mask & CHANGED_LINK) { // do start/stop anims stuff } } Yes. The structure of my script is very similar. It is checking if an avatar is seated, then checks the owner, if it is the owner physics is turned on with animations etc... But why would CHANGED_LINK change while crossing a border? The script is not checking for CHANGED_REGION.
|
Meade Paravane
Hedgehog
Join date: 21 Nov 2006
Posts: 4,845
|
11-19-2009 12:00
From: Caden Lynagh But why would CHANGED_LINK change while crossing a border? The script is not checking for CHANGED_REGION. It shouldn't fire a CHANGED_LINK when you cross a sim line. I was just making sure that you WERE checking for that and not assuming the changed event would only fire when somebody sat/stood. If you were assuming that, it would nicely explain the behaviour you're seeing. edit: any chance you'd like to post your code?
_____________________
Tired of shouting clubs and lucky chairs? Vote for llParcelSay!!! - Go here: http://jira.secondlife.com/browse/SVC-1224- If you see "if you were logged in.." on the left, click it and log in - Click the "Vote for it" link on the left
|
Caden Lynagh
Registered User
Join date: 13 Sep 2007
Posts: 13
|
11-19-2009 12:27
Here is the changed event. There is also a moving_end event in the script which apparently is triggered by sim crossing, but it does not seem to be causing the problem. Does llAvatarOnSitTarget have to be retrieved after crossing the sim border? changed(integer change) { if (change & CHANGED_LINK) { agent = llAvatarOnSitTarget(); if (agent) { if (agent != llGetOwner()) { llSay(0, not_owner_message); llUnSit(agent); } else { llSleep(.4); llSetStatus(STATUS_PHYSICS, TRUE); llSleep(.1); llRequestPermissions(agent, PERMISSION_TRIGGER_ANIMATION | PERMISSION_TAKE_CONTROLS); llStartAnimation("stand"  ; } } else { llSetStatus(STATUS_PHYSICS, FALSE); llSleep(.4); llReleaseControls(); llResetScript(); } }
|
Meade Paravane
Hedgehog
Join date: 21 Nov 2006
Posts: 4,845
|
11-19-2009 12:39
Except for the sleeps (evil!!) and doing anims before confirming permissions, that looks ok to me..
Is there anywhere else you start/stop animations in the script? It could be that the destination sim knows about the vehicle before it knows about the agent. Sorta kinda maybe related to SVC-22..
_____________________
Tired of shouting clubs and lucky chairs? Vote for llParcelSay!!! - Go here: http://jira.secondlife.com/browse/SVC-1224- If you see "if you were logged in.." on the left, click it and log in - Click the "Vote for it" link on the left
|
Caden Lynagh
Registered User
Join date: 13 Sep 2007
Posts: 13
|
11-19-2009 12:55
The only other places are within the script that play animations are the moving_end event that I mentioned (blocking it out does not fix) and in the vehicle controls (when moving forward play pedal animation). So I dunno. Thank you for your help. I will fix the permissions and look at getting rid of the sleeps.  I think that was a bit of code I found somewhere and used without thinking about it. I wonder why they are there?
|