Welcome to the Second Life Forums Archive

These forums are CLOSED. Please visit the new forums HERE

Collision detection object creator ?

Felowen Dodge
Registered User
Join date: 14 Aug 2006
Posts: 200
04-15-2009 13:12
Ok folks got a question. I want to know if this is possible...

Example:
I create a static object that has collision detection in it. Call it Object A.
I then want Object B to be dropped on Object A.
Object A should determine if Object B is by the creator of Object A and if so...do something. However if Object B is created by anyone else, I want the collision to be ignored.

Thank you in advance for any help you can provide.
Dora Gustafson
Registered User
Join date: 13 Mar 2007
Posts: 779
04-15-2009 13:28
Use a collision filter:
http://www.lslwiki.net/lslwiki/wakka.php?wakka=llCollisionFilter
_____________________
From Studio Dora
Meade Paravane
Hedgehog
Join date: 21 Nov 2006
Posts: 4,845
04-15-2009 13:47
I don't think that'll work, Dora - specifying a key will filter on an object key, not the creator/owner of the object.

Having the collision event check llDetectedKey then passing that to llGetObjectDetails is the only way I know to do this sorta thing.
_____________________
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
Rolig Loon
Not as dumb as I look
Join date: 22 Mar 2007
Posts: 2,482
04-15-2009 13:53
But unless I misunderstand your train of thought, llDetectedKey is just going to tell you who's nearby. That's not necessarily the person who dropped Object B, nor necessarily the creator of Object B. Or did you have something else in mind?
Void Singer
Int vSelf = Sing(void);
Join date: 24 Sep 2005
Posts: 6,973
04-15-2009 13:55
wouldn't llDetectedOwner work?
_____________________
|
| . "Cat-Like Typing Detected"
| . This post may contain errors in logic, spelling, and
| . grammar known to the SL populace to cause confusion
|
| - Please Use PHP tags when posting scripts/code, Thanks.
| - Can't See PHP or URL Tags Correctly? Check Out This Link...
| -
Meade Paravane
Hedgehog
Join date: 21 Nov 2006
Posts: 4,845
04-15-2009 14:04
From: Void Singer
wouldn't llDetectedOwner work?

It would but the OP says they want to filter on same-creator, not same-owner..
_____________________
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
Dora Gustafson
Registered User
Join date: 13 Mar 2007
Posts: 779
04-15-2009 14:07
From: Meade Paravane
I don't think that'll work, Dora - specifying a key will filter on an object key, not the creator/owner of the object
The question is put in a very vague way so I give a vague answer:) The question does not state that the owner's key is unknown. Maybe it is maybe it is not.
_____________________
From Studio Dora
Meade Paravane
Hedgehog
Join date: 21 Nov 2006
Posts: 4,845
04-15-2009 14:11
Er.. The OP doesn't mention owner at all - just creator..
_____________________
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
Felowen Dodge
Registered User
Join date: 14 Aug 2006
Posts: 200
04-15-2009 14:36
Ok folks, thank you for the responses thus far.
I didn't think it was vague at all. I want it so that Object A, when hit by Object B...Detects if Object B was created by the same creator as Object A, and if so to perform an action. If Object B's creator is not the same as Object A's, then to just ignore th collision altogether.

Essentially it has nothing to do with owner, only creator, this way no one else can create a same named Object B and use it on Object A. They will be required to use only the proprietary Object B on Object A.

To show an example:
Lets say we are talking about a bow, arrow and target system(which we aren't)
Ok, Object A = Target
Object B = Arrow

I want it so that when I sell a target, the person can not go and create thier own arrows. Since the target would only react to arrows made by me, they would need to only buy them from me.

Also in this example I can then sell items such as Bows, Crossbows, guns, whatever... as long as all of them contain the same Object B - Arrow created by me then it is easier for later development. Hopefully that makes sense for ya.

Thanks again.
Keira Wells
Blender Sculptor
Join date: 16 Mar 2008
Posts: 2,371
04-15-2009 14:42
http://lslwiki.net/lslwiki/wakka.php?wakka=llGetObjectDetails
Not sure if usable in this case, though.
_____________________
Tutorials for Sculpties using Blender!
Http://www.youtube.com/user/BlenderSL
Rolig Loon
Not as dumb as I look
Join date: 22 Mar 2007
Posts: 2,482
04-15-2009 14:46
So then Meade's suggestion, which looks something like

CODE

list CreatorB = llGetObjectDetails(llDetectedKey(0),[OBJECT_CREATOR]);
string TheCreator = llList2String(CreatorB,0);
if (TheCreator == llGetCreator())
{// do stuff
}


ought to work?

Edit: Well, almost. I forgot to covert from a list to a string. Corrected above, I think... Yes?
Felowen Dodge
Registered User
Join date: 14 Aug 2006
Posts: 200
04-16-2009 04:35
Well...thank you all. This is terrific. It works perfectly and my friend treated me to a display of a box being hit by her created object and someone else's. She was a lil happy as all she could say is "hey, hey, hey, look, hey hey hey hey hey look look look hey hey."

Thanks again folks
Void Singer
Int vSelf = Sing(void);
Join date: 24 Sep 2005
Posts: 6,973
04-16-2009 06:07
From: Meade Paravane
It would but the OP says they want to filter on same-creator, not same-owner..

was thinking it might be a limited case scenario where creator == owner
_____________________
|
| . "Cat-Like Typing Detected"
| . This post may contain errors in logic, spelling, and
| . grammar known to the SL populace to cause confusion
|
| - Please Use PHP tags when posting scripts/code, Thanks.
| - Can't See PHP or URL Tags Correctly? Check Out This Link...
| -
Twisted Laws
Registered User
Join date: 19 Jun 2006
Posts: 9
04-17-2009 16:15
checking the creator of an object is risky security if thats the intent (or in a game) if you have EVER given a full perm prim to anyone else. a full perm prim can be renamed whatever and be copied as much as necessary, scripted, etc...
Felowen Dodge
Registered User
Join date: 14 Aug 2006
Posts: 200
04-18-2009 05:54
Very good point. We were discussing that very thing the other day. I think we have worked around it so it should be fine, but thank you.
Lazink Maeterlinck
Registered User
Join date: 8 Nov 2005
Posts: 332
04-18-2009 14:58
You MIGHT consider, if your worried about someone spoofing the item, to use listens and put in some type of security, but opening a listener, getting the security code, and closing it, will take more time then just checking the creator, but it is something to consider. Just filter your listener as much as possible, downsides to everything. Just an option to keep in mind :)