šŸ“ƒ SLua Alpha

General discussion and feedback on Second Life's SLua Alpha
Fix touch_start behaviour in slua
LSL has an awkward bug / behavior with touch_start If a user is already touching a prim, no other users touch_start s will trigger, only their touch and touch_end events. This is awkward and seemingly undocumented at least on the wiki. While it may not be something that can be changed in lsl, it would be nice to clear this up in slua and not carry this "bug" over LSL script list ks = []; handle(string name, integer t) { while(t--) { string evnt = name + ": " + llDetectedName(t); if(llListFindList(ks,[evnt]) == -1) { ks += evnt; } } ks = llListSort(ks,1,1); llSetLinkPrimitiveParamsFast(0, [PRIM_TEXT,llDumpList2String(ks,"\n"),<1,1,1>,1]); llSetTimerEvent(5.0); } default { state_entry() { llSetLinkPrimitiveParamsFast(0, [PRIM_TEXT,"",<1,1,1>,1]); } touch_start(integer t) { handle("touch_start",t); } touch(integer t) { handle("touch",t); } touch_end(integer t) { handle("touch_end",t); } timer() { ks = []; llSetTimerEvent(0.0); llSetLinkPrimitiveParamsFast(0, [PRIM_TEXT,"",<1,1,1>,1]); } } SLua script local ks = {} local clearHandle = nil local function clear() ll.SetLinkPrimitiveParamsFast(0, {PRIM_TEXT,"",vector.one,1}) ks = {} end local function handler(name) return function(events:{DetectedEvent}) for _,event in events do local evnt = `{name}: {event:getName()}` if not table.find(ks, evnt) then ks[#ks+1] = evnt end end table.sort(ks) ll.SetLinkPrimitiveParamsFast(0, {PRIM_TEXT,table.concat(ks,"\n"),vector.one,1}) if clearHandle then LLTimers:off(clearHandle) end clearHandle = LLTimers:once(5, clear) end end clear() LLEvents:on("touch_start", handler("touch_start")) LLEvents:on("touch", handler("touch")) LLEvents:on("touch_end", handler("touch_end")) Both of these scripts require 2 users to click, and you can see that only the person that clicks first gets a touch_start set text.
1
Opening SLua script after compile error selects "LSO2" compile target (was: Recovering from "(0, 0) : ERROR : Syntax error")
Possibly related to [ https://feedback.secondlife.com/scripting-bugs/p/script-suddently-losing-connetion-with-the-server-on-save ] A few times I've gotten the above error. Fixing the syntax error does not eliminate the message — it's as if the script inventory instance is permanently disabled. My workaround has been to copy the script text to a new inventory instance. I was able to reproduce this on SLua Tombolo. 1) Create a block and add a new SLua script to it. 2) Change line 1 to: `` xxx ll.Say(0, "Hello, Avatar!") `` 3) Save. See an expected, normal error message. 4) Clone the object. Edit the script in the clone. 5) Notice the cloned script is marked not-running. 6) Use the external editor button to edit the cloned script. See the dreaded (0,0) error. (I am using BBEdit as my external editor: /usr/bin/open -a bbedit "%s" ) --- Second Life Project lua editor 7.1.12.13973830462 (64bit) Release Notes You are at 194.7, 250.2, 23.1 in SLua Tombolo located at simhost-0766603a88e3665d6.aditi SLURL: secondlife: //Aditi/secondlife/SLua%20Tombolo/195/250/23 (global coordinates 41154.7, 23802.2, 23.1) Luau 2025-03-27.14115520293 Release Notes CPU: Apple M2 Max (2400 MHz) Memory: 32768 MB OS Version: macOS 15.3.2 Darwin 24.3.0 Darwin Kernel Version 24.3.0: Thu Jan 2 20:24:23 PST 2025; root:xnu-11215.81.4~3/RELEASE_ARM64_T6020 x86_64 Graphics Card Vendor: Apple Graphics Card: Apple M2 Max OpenGL Version: 4.1 Metal - 89.3 Window size: 2602x2102 Font Size Adjustment: 96pt UI Scaling: 1 Draw distance: 512m Bandwidth: 3000kbit/s LOD factor: 1.25 Render quality: 2 Texture memory: 21845MB Disk cache: Max size 1638.4 MB (99.9% used) HiDPI display mode: true J2C Decoder Version: KDU v7.10.4 Audio Driver Version: OpenAL, version 1.1 ALSOFT 1.23.1 / OpenAL Community / OpenAL Soft: OpenAL Soft Dullahan: 1.14.0.202408091638 CEF: 118.4.1+g3dd6078+chromium-118.0.5993.54 Chromium: 118.0.5993.54 LibVLC Version: 3.0.21 Voice Server Version: Not Connected Packets Lost: 13/10384 (0.1%) March 30 2025 06:20:01
2
Ā·
inĀ progress