Help with CameraTurnScript (roblox)
I am trying to replicate the way you turn around in Baldi's Basics in Roblox, so I made a code. The thing wrong is, when i hold down the TURN_KEY and I turn around, I'm walking in the direction of when the camera turns around. I need someone to make the movement controls reversed when you hold down the TURN_KEY
https://redd.it/1d1jioz
@r_lua
I am trying to replicate the way you turn around in Baldi's Basics in Roblox, so I made a code. The thing wrong is, when i hold down the TURN_KEY and I turn around, I'm walking in the direction of when the camera turns around. I need someone to make the movement controls reversed when you hold down the TURN_KEY
https://redd.it/1d1jioz
@r_lua
Pastebin
Camera Turn Script - Pastebin.com
Pastebin.com is the number one paste tool since 2002. Pastebin is a website where you can store text online for a set period of time.
lua-fenster - Probably the most minimal cross-platform GUI library
https://github.com/jonasgeiler/lua-fenster
https://redd.it/1d1ply3
@r_lua
https://github.com/jonasgeiler/lua-fenster
https://redd.it/1d1ply3
@r_lua
GitHub
GitHub - jonasgeiler/lua-fenster: 📚 The most minimal cross-platform GUI library - now in Lua!
📚 The most minimal cross-platform GUI library - now in Lua! - jonasgeiler/lua-fenster
C++ style oop
Hello,
I made this:
Test = function(isBase, id)
---@private
local o = {
id = id or 5,
base = isBase or true,
}
o.index = o
o.getId = function(self)
return self.id
end
o.isBase = function(self)
return self.base
end
return o
end
Test2 = function(isBase, id, name)
local o = {
name = name,
}
setmetatable(o, Test(isBase, id))
return o
end
local test = Test2(true, "test")
local test1 = { Test2(false, 15, "lol"), Test2(false, 35, "lol") }
for , v in ipairs(test1) do
print(v:getId())
end
to somewhat mimic cpp style constructor at least.
So here is my question, is it correct path or it would result with unwanted behaviour?
https://redd.it/1d2z2m6
@r_lua
Hello,
I made this:
Test = function(isBase, id)
---@private
local o = {
id = id or 5,
base = isBase or true,
}
o.index = o
o.getId = function(self)
return self.id
end
o.isBase = function(self)
return self.base
end
return o
end
Test2 = function(isBase, id, name)
local o = {
name = name,
}
setmetatable(o, Test(isBase, id))
return o
end
local test = Test2(true, "test")
local test1 = { Test2(false, 15, "lol"), Test2(false, 35, "lol") }
for , v in ipairs(test1) do
print(v:getId())
end
to somewhat mimic cpp style constructor at least.
So here is my question, is it correct path or it would result with unwanted behaviour?
https://redd.it/1d2z2m6
@r_lua
Reddit
From the lua community on Reddit
Explore this post and more from the lua community
A template for hybrid development between C and Lua
Symbiotic-Lua is a template for hybrid development between C and Lua, being very useful for hybrid teams, or to facilitate the creation of programs. It generates a native Windows/Linux binary, without the need to install Lua, so it can be used to build desktop apps, or run in environments that cannot install Lua.
https://github.com/OUIsolutions/Symbiotic-Lua
https://redd.it/1d3aao5
@r_lua
Symbiotic-Lua is a template for hybrid development between C and Lua, being very useful for hybrid teams, or to facilitate the creation of programs. It generates a native Windows/Linux binary, without the need to install Lua, so it can be used to build desktop apps, or run in environments that cannot install Lua.
https://github.com/OUIsolutions/Symbiotic-Lua
https://redd.it/1d3aao5
@r_lua
GitHub
GitHub - OUIsolutions/Symbiotic-Lua: a template for hybrid programming between lua and C
a template for hybrid programming between lua and C - OUIsolutions/Symbiotic-Lua
Newbie Needs Unit Test Help
I have this simple test spec:
describe("Input Capture Service", function()
local api
local inputcaptureservice
beforeeach(function()
-- Mock the API object
api = mock({
executeString = function() end
}, true)
-- Create an instance of the inputcaptureservice with the mocked API
inputcaptureservice = inputcaptureservicemodule.inputcaptureservice(api)
end)
describe("getdigits", function()
it("should call api:executeString with the correct command", function()
-- Arrange
local soundfile = "test.wav"
local maxdigits = 5
local terminator = '#'
local expectedcommand = "playandgetdigits 1 5 1 5000 # test.wav silencestream://500"
-- Act
inputcaptureservice.getdigits(soundfile, maxdigits, terminator)
-- Assert
local stub = require("luassert.stub")
assert.stub(api.executeString).was.calledwith(expectedcommand)
end)
end)
Test results:
Input Capture Service getdigits should call api:executeString with the correct command spec/inputcapturespec.lua:32: Function was never called with matching arguments.
Called with (last call if any): (values list) ((table: 0x13ff416e0)
{ executeString = { by_default = { invokes = function: 0x13ff3e530 returns = function: 0x13ff3e4c0 } callback = function: 0x13ff3f650 called = function: 0x13ffca310 called_with = function: 0x13ff3e360 calls = { 1 = { ... more } } clear = function: 0x13ffca130 invokes = function: 0x13ff3e530 on_call_with = function: 0x13ff3e5d0 returned_with = function: 0x13ff3e390 returns = function: 0x13ff3e4c0 returnvals = { 1 = { ... more } } revert = function: 0x13ff3e3c0 target_key = 'executeString' target_table = { executeString = { ... more } } } }, (string) 'playandgetdigits 1 5 1 5000 # test.wav silencestream://500') Expected: (values list) ((string) 'playandgetdigits 1 5 1 5000 # test.wav silencestream://500')
I can't sort out what I'm doing wrong with the stub here.
I've verified that the expected string is indeed being passed down the line correctly.
It's my first four days with Lua, pls halp, lol
https://redd.it/1d3lotl
@r_lua
I have this simple test spec:
describe("Input Capture Service", function()
local api
local inputcaptureservice
beforeeach(function()
-- Mock the API object
api = mock({
executeString = function() end
}, true)
-- Create an instance of the inputcaptureservice with the mocked API
inputcaptureservice = inputcaptureservicemodule.inputcaptureservice(api)
end)
describe("getdigits", function()
it("should call api:executeString with the correct command", function()
-- Arrange
local soundfile = "test.wav"
local maxdigits = 5
local terminator = '#'
local expectedcommand = "playandgetdigits 1 5 1 5000 # test.wav silencestream://500"
-- Act
inputcaptureservice.getdigits(soundfile, maxdigits, terminator)
-- Assert
local stub = require("luassert.stub")
assert.stub(api.executeString).was.calledwith(expectedcommand)
end)
end)
Test results:
Input Capture Service getdigits should call api:executeString with the correct command spec/inputcapturespec.lua:32: Function was never called with matching arguments.
Called with (last call if any): (values list) ((table: 0x13ff416e0)
{ executeString = { by_default = { invokes = function: 0x13ff3e530 returns = function: 0x13ff3e4c0 } callback = function: 0x13ff3f650 called = function: 0x13ffca310 called_with = function: 0x13ff3e360 calls = { 1 = { ... more } } clear = function: 0x13ffca130 invokes = function: 0x13ff3e530 on_call_with = function: 0x13ff3e5d0 returned_with = function: 0x13ff3e390 returns = function: 0x13ff3e4c0 returnvals = { 1 = { ... more } } revert = function: 0x13ff3e3c0 target_key = 'executeString' target_table = { executeString = { ... more } } } }, (string) 'playandgetdigits 1 5 1 5000 # test.wav silencestream://500') Expected: (values list) ((string) 'playandgetdigits 1 5 1 5000 # test.wav silencestream://500')
I can't sort out what I'm doing wrong with the stub here.
I've verified that the expected string is indeed being passed down the line correctly.
It's my first four days with Lua, pls halp, lol
https://redd.it/1d3lotl
@r_lua
Reddit
From the lua community on Reddit
Explore this post and more from the lua community
Is there an up-to date alternative to fengari?
Considering fengari-webs latest commit is 3 years ago, I would consider it more than just stale. Is there any alternatives to run Lua in a html document thats more up to date than fengari?
https://redd.it/1d3zgec
@r_lua
Considering fengari-webs latest commit is 3 years ago, I would consider it more than just stale. Is there any alternatives to run Lua in a html document thats more up to date than fengari?
https://redd.it/1d3zgec
@r_lua
Reddit
From the lua community on Reddit
Explore this post and more from the lua community
LUA Executor?
Before anyone calls me a noscript kiddie, NO, I am not looking for a way to cheat in FiveM or Roblox. I am looking for a simple lua executor or a way to create one (I unfortunately don't know cpp to make injectors on my own).
Why? I am currently having fun decompiling Farming Simulator 2011 and fiddling around with it's source code and I was wondering if I can change game's boolean values or execute functions while the game is running since it was written in lua. Apologies if my post violates the rules. I am just a bored developer. Cheers :)
https://redd.it/1d4cxgu
@r_lua
Before anyone calls me a noscript kiddie, NO, I am not looking for a way to cheat in FiveM or Roblox. I am looking for a simple lua executor or a way to create one (I unfortunately don't know cpp to make injectors on my own).
Why? I am currently having fun decompiling Farming Simulator 2011 and fiddling around with it's source code and I was wondering if I can change game's boolean values or execute functions while the game is running since it was written in lua. Apologies if my post violates the rules. I am just a bored developer. Cheers :)
https://redd.it/1d4cxgu
@r_lua
Reddit
From the lua community on Reddit
Explore this post and more from the lua community
I need help to make this work
Good day, I'm trying to make a Cheat Table work for a game (Persona Q), and I keep getting this error:
Error:[string "---------------------------..."\]:369: attempt to index a nil value (local 'f')
366 --- returns the contents of a file in a given path
367 function readAll(file)
368 local f = io.open(file, "rb")
369 local content = f:read("*all"); f:close()
370 return content
371 end
The section of the code in question... (I know nothing about code, so apologies if it's something obvious)
https://github.com/zarroboogs/pq-ct/blob/master/citra-pq.CT
And this here is the github page
https://redd.it/1d4dxl1
@r_lua
Good day, I'm trying to make a Cheat Table work for a game (Persona Q), and I keep getting this error:
Error:[string "---------------------------..."\]:369: attempt to index a nil value (local 'f')
366 --- returns the contents of a file in a given path
367 function readAll(file)
368 local f = io.open(file, "rb")
369 local content = f:read("*all"); f:close()
370 return content
371 end
The section of the code in question... (I know nothing about code, so apologies if it's something obvious)
https://github.com/zarroboogs/pq-ct/blob/master/citra-pq.CT
And this here is the github page
https://redd.it/1d4dxl1
@r_lua
GitHub
pq-ct/citra-pq.CT at master · zarroboogs/pq-ct
A cheat table for Persona Q @ Citra. Contribute to zarroboogs/pq-ct development by creating an account on GitHub.
What do I think about Lua after shipping a project with 60,000 lines of Lua code?
https://blog.luden.io/what-do-i-think-about-lua-after-shipping-a-project-with-60-000-lines-of-code-bf72a1328733
https://redd.it/1d53qff
@r_lua
https://blog.luden.io/what-do-i-think-about-lua-after-shipping-a-project-with-60-000-lines-of-code-bf72a1328733
https://redd.it/1d53qff
@r_lua
Medium
What do I think about Lua after shipping a project with 60,000 lines of code?
Lead programmer talks Lua’s flexibility, challenges, and integration with Defold game engine after 60k lines of code in Craftomation 101.
Luaforwindows Luarocks error
C:\\Users\\####>luarocks install protobuf
Installing http://luarocks.org/repositories/rocks/protobuf-1.1.2-0.rockspec...
Cloning into 'protobuf-lua'...
fatal: unable to connect to github.com:
github.com[0: 140.82.121.3\]: errno=Unknown error
Error: Failed fetching files from GIT while cloning
https://redd.it/1d55brt
@r_lua
C:\\Users\\####>luarocks install protobuf
Installing http://luarocks.org/repositories/rocks/protobuf-1.1.2-0.rockspec...
Cloning into 'protobuf-lua'...
fatal: unable to connect to github.com:
github.com[0: 140.82.121.3\]: errno=Unknown error
Error: Failed fetching files from GIT while cloning
https://redd.it/1d55brt
@r_lua
LUA Table ripple load
I need to create a LUA table (20 elements) and always write new values to newTable[20\]=newValue. On the next iteration of the write to index 20 the value at newTable[20\] needs to go to newTable[19\], and repeat until the original value falls off the top. I don't know what this is called, and suspect it's been done before. Is there a LUA library function that does this kind of thing? Thanks.
https://redd.it/1d5oyiz
@r_lua
I need to create a LUA table (20 elements) and always write new values to newTable[20\]=newValue. On the next iteration of the write to index 20 the value at newTable[20\] needs to go to newTable[19\], and repeat until the original value falls off the top. I don't know what this is called, and suspect it's been done before. Is there a LUA library function that does this kind of thing? Thanks.
https://redd.it/1d5oyiz
@r_lua
Reddit
From the lua community on Reddit
Explore this post and more from the lua community
Lua for reaper reanoscript
Anyone here learn to code specifically for that scenario? How long did it take to learn? I’m not sure if it’s worth it just for that.
https://redd.it/1d6puwx
@r_lua
Anyone here learn to code specifically for that scenario? How long did it take to learn? I’m not sure if it’s worth it just for that.
https://redd.it/1d6puwx
@r_lua
Reddit
From the lua community on Reddit
Explore this post and more from the lua community
Online Lua course recommendations
Hi all, Has anybody done any online courses to learn Lua? If so any tips in terms of good ones to look at and ones to avoid?
https://redd.it/1d7h220
@r_lua
Hi all, Has anybody done any online courses to learn Lua? If so any tips in terms of good ones to look at and ones to avoid?
https://redd.it/1d7h220
@r_lua
Reddit
From the lua community on Reddit
Explore this post and more from the lua community
Not understanding why my noscript isnt working | Ghub API
I'm trying to make a macro play when 2 keys have been pressed (xButton1 & G1)
My noscript always fails to work unless I remove one of the keys as a requirement to fire the macro. What am I doing wrong?
if event =="MOUSE_BUTTON_PRESSED"
and arg == 5 then
if event =="G_PRESSED"
and arg == 1 then
PlayMacro()
https://redd.it/1d84ap1
@r_lua
I'm trying to make a macro play when 2 keys have been pressed (xButton1 & G1)
My noscript always fails to work unless I remove one of the keys as a requirement to fire the macro. What am I doing wrong?
if event =="MOUSE_BUTTON_PRESSED"
and arg == 5 then
if event =="G_PRESSED"
and arg == 1 then
PlayMacro()
https://redd.it/1d84ap1
@r_lua
Reddit
From the lua community on Reddit
Explore this post and more from the lua community
For beginners: 3 Fun Facts about the Lua Programming Language
https://youtube.com/shorts/iIRquYIstss
https://redd.it/1d8m3tj
@r_lua
https://youtube.com/shorts/iIRquYIstss
https://redd.it/1d8m3tj
@r_lua
YouTube
3 Fun Facts about the Lua Programming Language #shorts #short #lua #programming #funfacts #coding ng
How to learn Lua
I know the basics of Lua but don't know how to proceed. Any tips?
https://redd.it/1d9u0l1
@r_lua
I know the basics of Lua but don't know how to proceed. Any tips?
https://redd.it/1d9u0l1
@r_lua
Reddit
From the lua community on Reddit
Explore this post and more from the lua community