Jump to content

Message Linked


Shihan Feiri
 Share

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

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

Recommended Posts

Let me see if I have understund this

  llMessageLinked(  LINK_ALL_CHILDREN, 1, msg "");

llMessageLinked = send message

Link_all_children = where to send message

1 = prim where to send

msg = string

 " " - not sure lol

 

Also if  i understund corect, I can use llMessageLinked in every event in master script?

Also, I have read Loons post in arhive. It was about similar thing, but ther was script in same object.

I wonder...

 

If i have 2 script in child prim that are listening, how to say with llMessageLinked to who is message?

Link to comment
Share on other sites

Function: llMessageLinked( integer linknum, integer num, string str, key id );

The purpose of this function is to allow scripts in the same object to communicate. It triggers a link_message event with the same parameters num, str, and id in all scripts in the prim(s) described by linknum.

• integer linknum Link number (0: unlinked, 1: root prim, >1: child prims) or a LINK_* flag, controls which prim(s) receive the link_message.  
• integer num Value of the second parameter of the resulting link_message event.  
• string str Value of the third parameter of the resulting link_message event.  
• key id Value of the fourth parameter of the resulting link_message event.  

 You can use id as a second string field[1]. The sizes of str and id are only limited by available script memory.

OK, so linknum is an integer that tells the script where to send the message.  You may use any of the predefined constants (like LINK_SET) if you prefer, instead of integers. The other three parameters are anything you want them to be.  If you want to send a number, put it in the num variable.  If you want to send a key, put it in id.  If you want to send a string, you may use either str or id.  That's all there is to it.

llMessageLinked is a function.  You may use it as many times as you want, wherever you need it.  If you have more than one script listening to whatever you send, deal with it the same way that you would deal with chat messages on different channels.  Flags and if statements are your friends.

  • Like 1
Link to comment
Share on other sites

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