Welcome to the Second Life Forums Archive

These forums are CLOSED. Please visit the new forums HERE

Need Some Help, Collision, information passing.

Nyx Alsop
Registered User
Join date: 14 Dec 2008
Posts: 252
01-15-2010 17:30
I'm looking for a way to rezz an object, have it collide wih an object, then pass back to the origonal object who it hit.

All objects would be owned by the same person and there will be multiple numbers of rezzers, and many objects being rezzed. Each rezzer is assigned to a person and they control it.

The only way I can think to do it is.

Rezzer fires object and keeps a refrence to it's key in an list, when it hits, it shouts it's key back with what its hit, then the object that rezzed it searches it's list and if the keys in there, knows it's one of it's own objects.

But this still leaves a gap of, the objects need to know the person whos assigned to the rezzer(they will be sitting on it). The only way I can see is build a kind of server hold and pass databased information to the peoples object when there assigned it.

--

Is there a simpler, more efficent way of doing what I want to do?
Void Singer
Int vSelf = Sing(void);
Join date: 24 Sep 2005
Posts: 6,973
01-16-2010 02:27
if the av will be sitting on the rezzor, you can grab their key with llAvatarOnSitTarget (or llGetOwner if the rezzors are individually owned, in which case you could also grab the different owners from the collision with get owner key on the collided object)

you can cut down on communications by assigning the rezzed objects to a channel based on either the rezzors key, or the sitting avatars key, and passing it via the start parameter, then filtering it in the rezzor for a command structure (in which case you shouldn't need to know the rezzed objects key ahead of time, since it's membership will be determined by it's chat channel)
_____________________
|
| . "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...
| -
Nyx Alsop
Registered User
Join date: 14 Dec 2008
Posts: 252
01-16-2010 04:12
But how can the thing hitting their rezzer get their key?
Void Singer
Int vSelf = Sing(void);
Join date: 24 Sep 2005
Posts: 6,973
01-16-2010 04:24
if the rezzors are separately owned llGetOwnerKey( vKeyCollision );

if rezzors are collectively owned, it'd be easier for the rezzed item to pass it's channel to the impacted rezzor, and that rezzor could send the chatted collision notice (since it now knows the chat channel)
_____________________
|
| . "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...
| -
Nyx Alsop
Registered User
Join date: 14 Dec 2008
Posts: 252
01-16-2010 05:23
What it needs to do tho is

Rezzer A, fires object A and object A hits Rezzer B,

Object A then needs to tell Rezzer A who it hit, and whos the avatar sitting on Rezzer B

All are owned by the same person.
Nyx Alsop
Registered User
Join date: 14 Dec 2008
Posts: 252
01-16-2010 05:32
I get what your saying, but it's a gun fireing, think it could be done fast enough by SL, to set the listeners and then remove them?

During like a machine gun?

Is there anyway for the object hitting rezzer B, to pass a variable onto the object is collides with?
Void Singer
Int vSelf = Sing(void);
Join date: 24 Sep 2005
Posts: 6,973
01-16-2010 06:06
in my above example I assumed a single channel for each rezzor, set at rez time, not per bullet rez.

but a simpler solution assuming only hits to a rezzor count, use differently named bullets in each rezzor, and when a rezzor gets hit, it can chat what it was hit by, and report whose sitting on it.

you could even use something like that to determine teams and friendly fire.
_____________________
|
| . "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...
| -
Nyx Alsop
Registered User
Join date: 14 Dec 2008
Posts: 252
01-16-2010 08:06
Good idea, thanks.