quick fix
This commit is contained in:
parent
1ab15f077b
commit
f26c0d2853
1 changed files with 9 additions and 11 deletions
|
|
@ -2,29 +2,27 @@ key target;
|
|||
string displayText;
|
||||
|
||||
default {
|
||||
on_rez(integer start_param) {
|
||||
llOwnerSay("🧪 on_rez triggered with start_param: " + (string)start_param);
|
||||
llListen(start_param, "", NULL_KEY, "");
|
||||
llOwnerSay("📡 Listening on channel (on_rez): " + (string)start_param);
|
||||
}
|
||||
|
||||
state_entry() {
|
||||
llOwnerSay("🧭 StatFloat active");
|
||||
llSetText("Waiting...", <1,1,1>, 1.0);
|
||||
llSetText("⏳ Waiting...", <1,1,1>, 1.0);
|
||||
llSetTimerEvent(1.0);
|
||||
}
|
||||
|
||||
on_rez(integer start_param) {
|
||||
llListen(start_param, "", NULL_KEY, "");
|
||||
llOwnerSay("📡 Listening on channel " + (string)start_param);
|
||||
}
|
||||
|
||||
listen(integer channel, string name, key id, string message) {
|
||||
llOwnerSay("🔉 Heard on channel " + (string)channel + ": " + message);
|
||||
if (llSubStringIndex(message, "FLOAT:") == 0) {
|
||||
list parts = llParseString2List(message, ["|"], []);
|
||||
if (llGetListLength(parts) >= 2) {
|
||||
target = (key)llGetSubString(llList2String(parts, 0), 6, -1);
|
||||
displayText = llList2String(parts, 1);
|
||||
llSetText(displayText, <1,1,1>, 1.0);
|
||||
llOwnerSay("✅ Received FLOAT for: " + (string)target);
|
||||
llOwnerSay("✅ StatFloat updated for: " + (string)target);
|
||||
}
|
||||
} else if (message == "CLEANUP") {
|
||||
}
|
||||
else if (message == "CLEANUP") {
|
||||
llOwnerSay("🧹 Cleaning up...");
|
||||
llDie();
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue