Jump to content

Detect/Sense an object's over text


NixSteven
 Share

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

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

Recommended Posts

Hi There,

I am new to LSL Scripting and I am wanting to create a script. My idea is to rez a prim (lets say prim 1) next to another prim (prim 2) which has a hover text. And I want prim 1 to detect/sense the prim 2's hover text and send a message to me.

Can you please provide some guidelines how to implement this? Your help is greatly appreciated.

Thanks a lot!

 

Link to comment
Share on other sites

  • NixSteven changed the title to Detect/Sense an object's over text
20 minutes ago, sandi Mexicola said:

I didn't know you could do that!  👍

It's a relatively new addition to llGetObjectDetails().

ETA: Specifically it was added to the wiki page on April 14th (2022).

Edited by Quistess Alpha
  • Thanks 2
Link to comment
Share on other sites

1 hour ago, Quistess Alpha said:

It's a relatively new addition to llGetObjectDetails().

ETA: Specifically it was added to the wiki page on April 14th (2022).

They added it on my birthday, and I missed it!

A lot of us would have answered, "Nope, can't do that!"

Edited by Love Zhaoying
Link to comment
Share on other sites

Hi there, can someone please explain me why i am unable to capture the hover text on some objects? I was able to capture the hover text of an object using 

 llGetObjectDetails((string)llDetectedKey(0),[OBJECT_TEXT])

But for some objects (which has active script in it) won't detect the hover text. I am confused. Any help is appreciated. Thanks

 

Link to comment
Share on other sites

Possibly the detected object is a linkset and the hovertext is from a child link instead of the root? 

(If so, I don't think there's a way past that barrier with current script functionality. There's a recent accepted jira that would let us gradually walk the links of another object the way we can the scripted object itself, but there doesn't seem to be any development scheduled on it yet.)

Link to comment
Share on other sites

Ah, sorry, I should have mentioned that an OBJECT_PRIM_COUNT larger than 1, would indicate a linkset. (Same functionality in a standalone call: llGetObjectPrimCount() but you're already doing an llGetObjectDetails for OBJECT_TEXT so can maybe save a frame.)

It would almost never work, but one function that might return the key of a child prim is llCastRay() if the aim is extraordinarily lucky. I'm not thinking of anything else that ever finds child links of other objects.

Link to comment
Share on other sites

5 hours ago, NixSteven said:

Hi there, can someone please explain me why i am unable to capture the hover text on some objects? I was able to capture the hover text of an object using 

 llGetObjectDetails((string)llDetectedKey(0),[OBJECT_TEXT])

 

Using llDetectedKey would only work if:

  • The script detecting for the event is in the root (assuming it's detecting for any children firing off an event)
  • For events like touched, the prim must be set up to pass touches (default behaviour) - some scripted objects may change this. (See llPassTouches)
  • Thanks 1
Link to comment
Share on other sites

7 hours ago, Qie Niangao said:

Possibly the detected object is a linkset and the hovertext is from a child link instead of the root? 

FWIW I just tested it, and indeed, you only get the text from the specific prim specified, and the function is not limited by restricted permission objects. (There was no indication it would be, but it never hurts to check.)

As far as I can tell though, while you can get some info on a prim's linkset status with OBJECT_ROOT, OBJECT_PRIM_COUNT, and OBJECT_LINK_NUMBER, I don't see any obvious way to iterate through every link in a foreign linkset (in order to get the hovertext of every child).

 

  • Like 1
Link to comment
Share on other sites

36 minutes ago, Quistess Alpha said:

As far as I can tell though, while you can get some info on a prim's linkset status with OBJECT_ROOT, OBJECT_PRIM_COUNT, and OBJECT_LINK_NUMBER, I don't see any obvious way to iterate through every link in a foreign linkset (in order to get the hovertext of every child).

That's how I understand it, and why Lucy's feature request jira (cited above) would help. OBJECT_PRIM_COUNT tells how far to iterate the loop (analogous to how llGetNumberOfPrims() does for the scripted object itself) and then llGetObjectLinkKey() would fetch each child to inspect with llGetObjectDetails.

  • Like 1
Link to comment
Share on other sites

9 hours ago, Qie Niangao said:

That's how I understand it, and why Lucy's feature request jira (cited above) would help. OBJECT_PRIM_COUNT tells how far to iterate the loop (analogous to how llGetNumberOfPrims() does for the scripted object itself) and then llGetObjectLinkKey() would fetch each child to inspect with llGetObjectDetails.

I was going to bring up that function at today's server meeting, but the Puppetry talk snowballed any/all other topics of discussion.

  • Like 1
Link to comment
Share on other sites

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

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

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
 Share

×
×
  • Create New...