HELP? collision_start in root script, child prim collide

Creating scripts
Post Reply
User avatar
Sherrie Melody
Posts: 273
Joined: Fri Mar 29, 2013 6:56 pm
Has thanked: 201 times
Been thanked: 159 times

HELP? collision_start in root script, child prim collide

Post 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?
User avatar
Keith Selmes
Posts: 175
Joined: Fri Jan 04, 2013 1:13 pm
Location: Devon, UK
Has thanked: 174 times
Been thanked: 153 times
Contact:

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

Post 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.
WhiteStar Magic
Posts: 7
Joined: Mon Jan 07, 2013 2:28 pm
Has thanked: 0
Been thanked: 4 times

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

Post 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
These users thanked the author WhiteStar Magic for the post:
Graham Mills
Post Reply