Jump to content

Help!


Laura Demme
 Share

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

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

Recommended Posts

I've made an object using a "no mod" script.  The script requires a touch to activate.  I'd really like to make my object activate automatically when an avatar is nearby.  I've been googling for two days looking for a solution, and came across this comment in the forum archives, under the heading "Things You Can't with LSL:

"- "Touch" other objects. (But if you scripted the other object, you can have your object send a message telling the other object to behave as if it had been touched.)"

I'm hoping I can add a prim to my object that would contain an avatar sensor script which could then tell the other prim to "behave as if it had been touched."

I've figured out how to make a sensor, but have no clue how to achieve the second part.  I checked the Communication" section of the LSL Wiki, but didn't see anything.  Can anyone help?

Link to comment
Share on other sites

Communication needs two sides: One sending a message and one receiving it. If I understand you correctly, the receiving side would be a no-mod script - so sending the script a message will only have an effect if this script listens e.g. on the channel on which your saying script says something and if it knows what to do on reveiving a certain message.

If you don't have such an 'API' for your no-mod script, I'm afraid, you can't really send it a message.

Link to comment
Share on other sites

Sorry, it's not that easy.  What that archive article is suggesting is that you can write the first script so that it ALSO listens for your other objects and carries out the 'touched' actions when they tell it to.  The same thing can be done with linked-messages if they are all in a single object.

Unless your no-mod script accepts such other input (it should have been documented) then there isn't any way to trigger it.

[ETA: Wd Darkie, that's another L$0 I owe you]

Link to comment
Share on other sites

Wow, such fast responses! :)

Thanks to you both for responding!  I guess I was thinking/hoping that I could add a separate "listen" script to the original prim, hoping the 1st script would recognize the "touch."  I guess I'll have to try another approach.

 

 

Link to comment
Share on other sites

You are about to reply to a thread that has been inactive for 4831 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...