Jump to content
  • 0

Anyone knows how to link scripted objects to a HUD?


rabbitboo
 Share

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

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

Question

2 answers to this question

Recommended Posts

  • 0

You can't link them to your HUD.  The only things you could link to your HUD are other HUDs, since they are the only things that could possibly be on your screen.  If you want your HUD to control the way objects move, you'll have to communicate from the HUD to them by sending chat messages of one type or another.  For example, if you want a click on your HUD to make some object move UP you'll have to send a message (like "UP") from the HUD's script to a script in the object.  Then you'll have to tell the script that receives the message what "UP" means.  It really doesn't make any difference that your HUD is a HUD, BTW.  This is simply a problem of scripting one object to talk when it's poked and another object to do something when it hears the first object talk.

See http://wiki.secondlife.com/wiki/Listen , http://wiki.secondlife.com/wiki/LlListen , and http://wiki.secondlife.com/wiki/LlSay for a start.

  • Like 1
Link to comment
Share on other sites

  • 0

Rolig said already everything that covers it.

Just in case you want to link something on the HUD layer to some HUD and make the objects move 'on' your HUD layer:

- Generally it is not a good idea to 'link' objects to heavily scripted other objects like HUDs. Especially when their scripts contain messaging towards linked_child prims based on their numbers, adding another object will screw up the whole HUD because the numbers may not be correct anymore, or also could screw up and influence your newly added / linked object.

For testing this i strongly recommend making a copy of the HUD first and testing on this copy.

For controling objects which are inworlds:
- as rolig said, you can't 'link' an object to a HUD because they are on different 'layers' so to say (HUD layer and inworld layer)
- If you want to link the controling button that sends the commands (see roligs answer) to the object in world to move it etc, keep the formerly mentioned in mind, about linking objects to an existing HUD.

In any case if you wonder how to script such a messaging system to move your script post a question in the scripting forum : )

Link to comment
Share on other sites

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