Jump to content

Scripts comminucating with each other.. how many ways are there?


Kerri Macarthur
 Share

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

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

Recommended Posts


Kerri Macarthur wrote:

Ok, I know of 2, but suspect I'm missing something. 

I'm aware of linked messages, or simply making one script 'say' and the other 'listen'. But is there any other way 2 scripts could communicate, or one script could be affected by another?

All possible ways to communicate in LSL are listed here

If a prim property like size, position, rotation, speed, object name and description is changed by a script it could be detected by another script

:smileysurprised::):smileyvery-happy:

Link to comment
Share on other sites

I looked through that list and nothing stands out really.

It's weird, I have 2 scripts. When one is used on it's own, it behaves one way. but when the 2nd is added, the whole machine works differently. Yet I cannot find any communications going between them. I've scanned for linked messages and chat, but nothing is there

Link to comment
Share on other sites


Kerri Macarthur wrote:

 

Well to be honest, if the scripts were moddable i'd be able to work it out for myself! D'uh

Unfortunately, since they are no-mod there's no way that we can guess what's going on inside either.  There are too many ways for unrelated scripts to interfere with each other.  Even if we could guess, there's no way for you to modify the scripts to change their behavior.  In situations like this, the best solution is to set both scripts aside and write your own.

Link to comment
Share on other sites

We might be able to make better guesses if we knew specifically what the difference in behavior is. In general, though, you could look through all possible events to which scripts can respond and ponder how those could be generated by another script. Then you might put in your own "sniffer" script to monitor for each event you can. I might start with http_response() and changed() now that link_message is ruled out. Maybe email() next, requiring llGetNextEmail(). 

It would be much messier to diagnose unintended side-effects between scripts than to reverse-engineer designed behaviour. I'm not even sure which of these we're doing here.

[ETA: I meant to ask how we know that the scripts aren't using chat. If they're in the very same prim, then they can't and we don't have to test anything. If they're in separate (possibly linked) prims, then there's a very, very large space of channels one would need to monitor. Not "heat death of the universe" large, but pretty intractably big when you can only watch 65 simultaneous channels per script.]

Link to comment
Share on other sites


Kerri Macarthur wrote:

I looked through that list and nothing stands out really.

It's weird, I have 2 scripts. When one is used on it's own, it behaves one way. but when the 2nd is added, the whole machine works differently. Yet I cannot find any communications going between them. I've scanned for linked messages and chat, but nothing is there

There's no need to be communicating at all with each other. The first script may simply be watching the inventory and changing its behavior when it sees the other script added.

 

See https://wiki.secondlife.com/wiki/Category:LSL_Inventory for the tools one can use that can be used to check what has been added when the changed() event handler has been triggered.

Link to comment
Share on other sites

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