Mantis Bug Tracker

View Issue Details Jump to Notes ] Issue History ] Print ]
IDProjectCategoryView StatusDate SubmittedLast Update
0006702opensim[REGION] Script Functionspublic2013-07-06 14:062019-01-31 02:28
ReporterGezebu MindBlue 
Assigned To 
PlatformLinuxOSFedora 18OS Version64 bits
Product Versionmaster (dev code) 
Target VersionFixed in Version 
Summary0006702: llDetectedLinkNumber not work in Collision Event
DescriptionIn LSL Function Status is listed as Fully Implemented but only partially works.
llDetectedLinkNumber working properly in touch events but not work in collision event. This also should work with collision.
Steps To Reproduce// create a linkset floor paved with different colored prims, place the script in root and walk up. This script run OK in SecondLife.

vector color_colision = <0.000000,0.501961,0.501961>;
integer prim_pisado;
float delay = 0.3;

        integer i;
    collision(integer num_detected){
        if(prim_pisado != llDetectedLinkNumber(0)){
            prim_pisado = llDetectedLinkNumber(0);
    collision_end(integer num_detected){
        prim_pisado = FALSE;
        integer i;
            if(i != prim_pisado){
                string color_temp = (string)llGetLinkPrimitiveParams(i,[PRIM_DESC]);
TagsNo tags attached.
Git Revision or version numberOpenSimulator version: OpenSim 0.7.6 Dev 7453965
Run Mode Standalone (Multiple Regions)
Physics EngineODE
Script Engine
EnvironmentMono / Linux64
Mono Version2.10
ViewerTeapot & Firestorm
Attached Filespng file icon piso-colores_001.png [^] (1,393,017 bytes) 2013-07-06 14:06

- Relationships

-  Notes
Artemis Tesla (reporter)
2013-09-27 04:50
edited on: 2013-09-27 04:50

llDetectedLinkNumber(0) returns 0 when used in a collision event as part of a linkset. Please fix :)

justincc (administrator)
2013-12-05 17:55

I think this issue stems from the physics engines not transmitting information for collisions with linked parts. Would need to look at this end of things more closely.
unregi (reporter)
2019-01-29 22:19

bumping this, as i see this issue right now with ubODE
tampa (reporter)
2019-01-30 01:57

Using latest master, the square I am standing on turns green, the rest are black. The function returns the correct link number.
BillBlight (developer)
2019-01-30 03:05

according to the sl wiki for this function

llDetectedLinkNumber will return 0 in collision_start and collision_end events of VolumeDetect objects (SVC-2996). [^]
tampa (reporter)
2019-01-30 03:29

I can make the script work, but adding prims to the linkset the script cannot find them until it is recompiled. I edited the script to reset upon changed and on touch, but resetting the script is evidently not enough to have llDetectedLinkNumber report back the link number of the newly added prims. It requires a recompile of the script to detect the new prims properly. This may be what the original reporter experienced and this seems like a bug to me.
UbitUmarov (administrator)
2019-01-30 04:39

think this issue was fixed with 0.9x for Xengine
but was still a issue on Yengine
hope fixed now on master
plz let us know

btw VolumeDetect is a linkset prop, so makes sense it returns 0
guess it did not, should do now
UbitUmarov (administrator)
2019-01-30 04:43

btw changed the script to:

    collision_start(integer num_detected){
// llSay(0,"Collision "+ llDetectedLinkNumber(0));
        if(prim_pisado != llDetectedLinkNumber(0)){
            prim_pisado = llDetectedLinkNumber(0);
    collision_end(integer num_detected){
        if(prim_pisado == llDetectedLinkNumber(0))
            prim_pisado = -1;
// llSay(0,"Collision end "+ llDetectedLinkNumber(0));

and seems working fine with a lot less lag
tampa (reporter)
2019-01-30 06:35

Seems to work on YEngine now too, although as stated there is still something wrong with the detecting of collision on linksets that have been expanded. Would be nice to have this fixed at some point as well so recompiling the script is no longer needed each time a link is added.
unregi (reporter)
2019-01-30 16:38

Can confirm, it works now, thank you Ubit.
Also can confirm that it needs a script reset after links changed.
UbitUmarov (administrator)
2019-01-31 02:28

ok try link now

- Issue History
Date Modified Username Field Change
2013-07-06 14:06 Gezebu MindBlue New Issue
2013-07-06 14:06 Gezebu MindBlue File Added: piso-colores_001.png
2013-09-27 04:50 Artemis Tesla Note Added: 0024412
2013-09-27 04:50 Artemis Tesla Note Edited: 0024412 View Revisions
2013-12-05 17:55 justincc Note Added: 0024830
2019-01-29 22:19 unregi Note Added: 0034017
2019-01-30 01:57 tampa Note Added: 0034034
2019-01-30 03:05 BillBlight Note Added: 0034035
2019-01-30 03:29 tampa Note Added: 0034036
2019-01-30 04:39 UbitUmarov Note Added: 0034037
2019-01-30 04:43 UbitUmarov Note Added: 0034038
2019-01-30 06:35 tampa Note Added: 0034039
2019-01-30 16:38 unregi Note Added: 0034042
2019-01-31 02:28 UbitUmarov Note Added: 0034058

Copyright © 2000 - 2012 MantisBT Group
Powered by Mantis Bugtracker