Jump to content

halp, trying to get scripts to talk to a "main script"


sophy7777
 Share

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

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

Recommended Posts

so me and a friend have started making a HUD for puppy sounds, eg woof, growl ect. 

and as the project came along we've realized that i (myself) need a little help making the script as we would want the buttons to talk back to the root prim so that the hud sounds could be turned on and off, a choice to change name of person wearing the hud, and read setting notcard. i know how to do the parts but making them comunicate together has me confused. any help would be greatly helpful, even if its just the name to what im thinking of as so far the only lllisten ive found is to local chat for the owner to say a phrase. 

Link to comment
Share on other sites

Use linked messages.  Send with llMessageLinked and receive in a link_message event.  Even better, though .... Unless you have a good reason to make each of your HUD buttons as a separate linked prim, it's much smoother to simply texture your HUD with an image that looks like a user interface with a bunch of button on it.  Then use llDetectedTouchST to determine which area of the texture the user clicked on.  That saves you having to put a mess of separate scripts in all of the buttons.  You do the whole job with a single script in the root (the only prim, actually).

  • Like 1
Link to comment
Share on other sites

8 minutes ago, Rolig Loon said:

Use linked messages.  Send with llMessageLinked and receive in a link_message event.  Even better, though .... Unless you have a good reason to make each of your HUD buttons as a separate linked prim, it's much smoother to simply texture your HUD with an image that looks like a user interface with a bunch of button on it.  Then use llDetectedTouchST to determine which area of the texture the user clicked on.  That saves you having to put a mess of separate scripts in all of the buttons.  You do the whole job with a single script in the root (the only prim, actually).

ll message linked looks a good way, ill have to read up on it as i haven't yet came across this before! id have to search out a few examples to help me ^.^ thank you so much!

Link to comment
Share on other sites

As an alternative to Rolig's method of using a texture and llDetectedTouchST(which is probably how I'd do it, in fact), if you want to use separate prims as buttons, you can still do it with only one script.    Simply give each button prim a unique name ("Button A", "Button B" and so on) and then have a single script in the root prim which, in the touch_start event, identifies the touched button by using llGetLinkName(llDetectedLinkNumber(0)) and then decides from that which sound to play.

  • Like 1
Link to comment
Share on other sites

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