Jump to content

How to make hud button activate/touch a object?


Zero Dufour
 Share

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

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

Recommended Posts

Sorry this is a very noob question, I assume this is very possible...

Instead of clicking an object to activate the script inside I want to click a button on a HUD to activate it.

So a script in the hud button and a script in the object to activate just as it would if i were to click the object to activate it?

 

Thanks in advance for the help!

Link to comment
Share on other sites

Quite easy.  It requires only two steps, and you have identified both of them correctly.  First, script your HUD to send a signal (usually as a llRegionSay or llRegionSayTo message) to your object.  Then script the object to receive that message and use it to activate the object the same way that touching it does now. That second step just means inserting a listen event that does the same thing as the script's touch_start event does now.  Assign a unique channel for the communication to be sure that it isn't intercepted or confused by other things in the area.

  • Like 1
Link to comment
Share on other sites

Welcome to LSL.  If you have never scripted in this language before, you may want to start by spending an afternoon with a couple of tutorials.  The language itself is not particularly difficult, once you understand its conceptual state/event structure.  You can get guidance of a sort from the LSL wiki and you may come here if you get stuck.  Targeted, specific questions accompanied by a code snippet are best.  This first task you have set on is a good one to begin with.  It's short and pretty easy, and you already have a script that works to begin with.

Link to comment
Share on other sites

  • 4 years later...

I want same thing but no time to learn scripting... looked around everywhere... anybody know where I can obtaim a simple script to do this exact thing also... to act as though an avatar touched the object

I did buy  a transmitter receiver script I could put the lines of code... only managed to add channel...  but up to now...although searching around...no idea what to use to message the object.

Thanks if can help....

Link to comment
Share on other sites

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