- Create a prim and drop the
aeros / API v[VERSION]script into it. - Create a new script inside the prim and copy-paste the following:
OBS_send(key target, string payload) {
llMessageLinked(LINK_THIS, -78000, payload, target);
}
default {
state_entry() {
}
touch_start(integer i) {
// On touch, send ";"-separated command var=val pairs
// In this example: random stage and vertical angle
float s = llFrand(1);
float v = 0.25+llFrand(0.5);
OBS_send(llGetOwner(), "s="+(string)s+";v="+(string)v);
}
link_message(integer sender_num, integer num, string str, key id) {
if (num >= -78002 && num <= -78001) {
if (llGetOwnerKey(id)!=llGetOwner()) return; // Filter by object owner
if (num == -78001) {
// Notifications. Uncomment to monitor:
// llOwnerSay("[!]\t"+str);
} else if (num == -78002) {
// Intents and constraints sent by the HUD or other attached add-ons.
// Same-owner only.
// Use it to learn HUD's commands.
// llOwnerSay("\t"+str);
}
}
}
}- Attach the prim as a HUD.
- Touch the prim and observe the changes happening with your Device.
You now have a playground ready to experiment with other commands described in API Reference.
Obsidian