From a8dcf17b2711b8ef5e9f79a2ff3dc8daea83a758 Mon Sep 17 00:00:00 2001 From: RebeccaNod1 Date: Sun, 5 Apr 2026 10:07:55 -0600 Subject: [PATCH] v3.2.2: Hybrid HUD Upgrade - Personal HUD for humans (ATTACH_HUD_CENTER_2) and in-world floaters for bots --- Floater_Manager.lsl | 6 ++++++ PlayerStatus_Float.lsl | 32 +++++++++++++++++++++++++++++++- 2 files changed, 37 insertions(+), 1 deletion(-) diff --git a/Floater_Manager.lsl b/Floater_Manager.lsl index 3f87fa2..e1fa4ae 100644 --- a/Floater_Manager.lsl +++ b/Floater_Manager.lsl @@ -171,6 +171,12 @@ default { llSleep(0.2); llRegionSay(ch, "SET_NAME:" + name); + // --- HUD UPGRADE: Attach to Humans --- + // If it's a valid avatar key and NOT a bot name, signal the float to attach + if (avKey != NULL_KEY && llSubStringIndex(name, "(Bot)") == -1) { + llRegionSay(ch, "ATTACH_TO:" + (string)avKey); + } + // Initial update to populate text/life display llMessageLinked(LINK_SET, MSG_UPDATE_FLOAT, name, avKey); } else { diff --git a/PlayerStatus_Float.lsl b/PlayerStatus_Float.lsl index bddf0ba..f9b64ef 100644 --- a/PlayerStatus_Float.lsl +++ b/PlayerStatus_Float.lsl @@ -22,10 +22,34 @@ default { if (listenHandle != -1) llListenRemove(listenHandle); listenHandle = llListen(start_param, "", NULL_KEY, ""); myName = ""; - // Correct LSL function name is llSetRemoteScriptAccessPin llSetRemoteScriptAccessPin(1337); } + attach(key id) { + if (id != NULL_KEY) { + // HUD MODE: Stop following target in-world + llSetTimerEvent(0.0); + + // HUD Scaling & Rotation (Center 2 focus) + // Smaller scale, reset rotation to face screen + llSetLinkPrimitiveParamsFast(LINK_THIS, [ + PRIM_SIZE, <0.05, 0.05, 0.05>, + PRIM_ROTATION, ZERO_ROTATION, + PRIM_POSITION, <0.0, 0.0, 0.0> + ]); + + dbg("📊 [Status Float] HUD Mode Activated for " + llKey2Name(id)); + } else { + // BACK TO WORLD: Restore size and follow logic + llSetLinkPrimitiveParamsFast(LINK_THIS, [PRIM_SIZE, <0.2, 0.2, 0.2>]); + } + } + + experience_permissions(key av) { + // ATTACH_HUD_CENTER_2 = 31 + llAttachToAvatarTemp(31); + } + listen(integer channel, string name, key id, string message) { // Universal Floater API - Format: CMD:avKey|T=Text|G=Glow|C=Color|H=HeartTexture if (llSubStringIndex(message, "CMD:") == 0) { @@ -67,6 +91,12 @@ default { else if (message == "CLEANUP") { llDie(); } + else if (llSubStringIndex(message, "ATTACH_TO:") == 0) { + key avKey = (key)llGetSubString(message, 10, -1); + if (avKey != NULL_KEY) { + llRequestExperiencePermissions(avKey, ""); + } + } else if (llSubStringIndex(message, "SET_NAME:") == 0) { myName = llGetSubString(message, 9, -1); llSetObjectDesc(myName);