/* An example of an HUD to connect to an SFposer First, make sure to set allowRemote=3 or allowRemote=4 to the .SFconfig notecard in your poser Create 3 cubes, link them together and add this script in the root. Take this into inventory and wear it as an HUD. The root cube will be used to find the nearest sfposer named "throne" when clicked The other 2 buttons are sending pose commands to SFposer */ string sfposer_name = "throne"; // Change this to the name of your SFposer object key sfKey=NULL_KEY; sayToPoser(string cmd) { if (sfKey != NULL_KEY) { // Send command to the dataserver API osMessageObject(sfKey, cmd); llOwnerSay("Sent "+cmd); } } default { touch_start(integer n) { integer clicked = llDetectedLinkNumber(0); if (clicked == 1) { // The first button will 'connect' to the nearby poser llSensor(sfposer_name , "", SCRIPTED, 10, PI); } else if (clicked == 2) { //You can send any shortcode command to the poser sayToPoser( "SWITCHTOMENU{Sit}"); sayToPoser( "SWITCHTOPOSE{Talk}"); } else { sayToPoser( "SWITCHTOMENU{Cuddle}"); sayToPoser( "SWITCHTOPOSE{Hug}"); } } sensor(integer n) { sfKey = llDetectedKey(0); llOwnerSay( "Connected to "+llDetectedName(0) ); } no_sensor() { llOwnerSay("Object "+sfposer_name+" not found"); } }