|
Redd Shelman
Registered User
Join date: 6 Jul 2008
Posts: 5
|
04-26-2009 03:02
Is it possible to be able to detect the name of a prim which just collided with a physical, scripted object, even if it was linked? (Ofcourse, it shouldn't matter that the scripted object is physical...)
Right now I have a collision system that detects the name of what hit the physical object, and does things according to it.
But it doesn't work with linked prims, as a believe llDetectedName is only fetching the root prim of the colliding object. Never checked, but it does seem to be the case.
|
|
Johan Laurasia
Fully Rezzed
Join date: 31 Oct 2006
Posts: 1,394
|
04-26-2009 03:33
maybe try using llDetectedLinkNumber and build a lookup table such as:
list [0,"piece0",1,"piece1",3,"piece2"]
and use llListFindList() to find the link number, and the next list entry is the link name.
_____________________
My tutes http://www.youtube.com/johanlaurasia
|
|
Johan Laurasia
Fully Rezzed
Join date: 31 Oct 2006
Posts: 1,394
|
04-26-2009 03:39
opps...
_____________________
My tutes http://www.youtube.com/johanlaurasia
|
|
Redd Shelman
Registered User
Join date: 6 Jul 2008
Posts: 5
|
04-26-2009 03:44
Oops? Well... guess it's justifiable if you made a mistake yourself or not. I have no idea what you're on about.  Maybe a quick snippet or something could help?
|
|
Ruthven Willenov
Darkness in your light
Join date: 16 Jan 2008
Posts: 965
|
04-26-2009 04:25
you'r correct, it does only detect the root prim of the object that collides with it. depending on what you want to do though, you may be able to take a backwards approach to it. how about a script in all but the root prim of the colliding object, when it collides with the target the collision event should only be triggered in the link(s) that collided with the target. then they can report whatever info you need to the target
|
|
Ruthven Willenov
Darkness in your light
Join date: 16 Jan 2008
Posts: 965
|
04-26-2009 04:27
From: Johan Laurasia maybe try using llDetectedLinkNumber and build a lookup table such as:
list [0,"piece0",1,"piece1",3,"piece2"]
and use llListFindList() to find the link number, and the next list entry is the link name. actually all you need is: llGetLinkName(llDetectedLinkNumber(0)) but this is backwards of what redd is trying to do
|
|
Redd Shelman
Registered User
Join date: 6 Jul 2008
Posts: 5
|
04-26-2009 11:04
From: Ruthven Willenov you'r correct, it does only detect the root prim of the object that collides with it. depending on what you want to do though, you may be able to take a backwards approach to it. how about a script in all but the root prim of the colliding object, when it collides with the target the collision event should only be triggered in the link(s) that collided with the target. then they can report whatever info you need to the target Sounds confusing. : /
|