Jump to content
Xander Lopez

llcastray filters

You are about to reply to a thread that has been inactive for 97 days.

Please take a moment to consider if this thread is worth bumping.

Recommended Posts

So i can see from wiki that llCastRay will accept four filters 

  • RC_REJECT_AGENTS
  • RC_REJECT_PHYSICAL
  • RC_REJECT_NONPHYSICAL
  • RC_REJECT_LAND

What I am trying to achieve is a bit complicated.

I am trying to create a weapon that can detect Avatar, AND ALSO certain type of prims.  This special prims might have some special script inside, or maybe created by certain avatar, or maybe has some other indicator that says the prim is eligible for llCastRay to recognize.

Is there any way to do this? If the ray hits any normal prims that are not eligible, i want it to just continue on until it hits any avatar or any valid prims. It seems very complicated to come up with this kind of rule.

Any suggestions?

 

 

 

Share this post


Link to post
Share on other sites

The short and simple answer is "you can't."

 

That said, there are a couple ways to do it. You either increase the value of RC_MAX_HITS and check each hit separately, or you keep it at 1 and create new rays for every hit that isn't eligible, either from where the previous ray ended or with some additional offset.

Share this post


Link to post
Share on other sites
Posted (edited)

It's possible.

You would have to use RC_REJECT_LAND, a higher RC_MAX_HITS, and either RC_REJECT_NONPHYSICAL or RC_REJECT_PHYSICAL depending on if these special objects are physical (movable via collision) or not. Each hit would require you to run llGetObjectDetails to find the specific parameters of the object you're looking for.

Though, you cannot view the items inside 1 object with an object it isn't linked to - You can get how many total but not what they are or their names. So you won't be able to see whatever script it is you're looking for, so you will have to find some other way to store the required information.

Edited by Secondary Lionheart

Share this post


Link to post
Share on other sites
19 hours ago, Secondary Lionheart said:

Though, you cannot view the items inside 1 object with an object it isn't linked to - You can get how many total but not what they are or their names. So you won't be able to see whatever script it is you're looking for, so you will have to find some other way to store the required information.

He could send the object in question a message on a predetermined channel (llRegionSayTo) and add a script to your discovered object that would respond with a "yes, I'm your object". If you don't get the response back you know it isn't one of yours.

Share this post


Link to post
Share on other sites
2 hours ago, Rider Linden said:

He could send the object in question a message on a predetermined channel (llRegionSayTo) and add a script to your discovered object that would respond with a "yes, I'm your object". If you don't get the response back you know it isn't one of yours.

I don't think he's looking to prep all objects with such overhead.

Share this post


Link to post
Share on other sites
You are about to reply to a thread that has been inactive for 97 days.

Please take a moment to consider if this thread is worth bumping.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.


×
×
  • Create New...