Page 1 of 1

HELP? collision_start in root script, child prim collide

Posted: Tue Jan 07, 2014 12:47 am
by Sherrie Melody
Example set up: 1 linkset with the root prim plus some child prims. The root prim contains a simple script:

Code: Select all

default
{
    collision_start(integer n)
    {
        llSay(0, "collision detected");
    }
}
None of the child prims contain scripts.

Collisions with the root prim trigger the collision_start event. But I also expected that the collision_start event would be triggered if I collide with any of the child prims.

Collisions with child prims in the above linkset should trigger the collision_start event, according to information on the following pages:
The old lsl wiki: http://lslwiki.net/lslwiki/wakka.php?wa ... sion_start (the new one doesn't even discuss it)
An opensim JIRA issue (look at the Additional Information section): http://opensimulator.org/mantis/view.php?id=4964

This does not happen though. Only collisions with the root prim trigger the event in the linkset described above.

However, *IF* I put a script in one of the child prims, even an empty script or a script that is set to not run, collisions with that child prim trigger the collision_start event in the root prim. That is very odd to me. I can even put a broken script in a child prim, and the collision_start event is triggered in the root.

Does anyone know what the current official "expected behavior" is?

Re: HELP? collision_start in root script, child prim collide

Posted: Wed Jan 08, 2014 11:15 am
by Keith Selmes
I don't know what is supposed to happen, but it seems actually to be as stated above.

For example, using a runway layout containing several sections:

The root prim has a collision detection script.
This works when an avatar walks on and off the root prim.

A runway section child prim has it's own collision detection script.
This also works when an avatar walks on and off that prim.
In this case, the root prim does not report the collisions.

Collisions are not detected in any other runway sections.

Then:
In another runway section (child prim) start a standard New Script.
The root prim now detects when an avatar walks on and off this section.
Delete the New Script from this section.
Root prim continues to report collisions from this section.

Take a copy of the linkset, and rez a new one.
Behaviour is now as original, collisions are not detected in sections with no script.

Testing with a helicopter gives the same response as an avatar walking or jumping on the surface.

I also have been testing with some vehicles, but not getting very consistent results. Need to that again carefully.

Re: HELP? collision_start in root script, child prim collide

Posted: Fri Feb 07, 2014 11:56 pm
by WhiteStar Magic
To pass collisions from a child prim to root prim you have to set llPassCollisions( TRUE )
Reference:
http://wiki.secondlife.com/wiki/LlPassCollisions