Posts by arthurgps2 • 411 points
17 posts
-
0
votes0
answers56
viewsQ: Loop for was supposed to run 5 times, but runs only 1
So I’m having a problem with a loop for in the code below: for i=1,#collisionBlocks do t=collisionBlocks[i] print(#collisionBlocks) print(i) if player.y-1<t[4] and player.y-1>t[2] and…
-
3
votes3
answers142
viewsQ: Is there any way to get a particular line from a string?
I have this example string: s = [[Pão com Requeijão]] Is there any way to get only the second line of the string? If so, how?
-
1
votes1
answer142
viewsQ: Is there a table breaker in Lua?
I’m wondering this because I want to know if one table is the same as another, if it’s an empty table or something.
-
1
votes1
answer647
viewsQ: Can someone explain to me what is a Gothic Moon tie?
I already know the bonds while,repeat and for,but when I was seeing the types of loops, for generic" . The text was in English.
-
1
votes1
answer51
viewsQ: Is there any way to modify what the module will return in Lua?
I want to know if it exists since I have a data storage system, in which the data stays in a table and when the player enters,this data is stored in a module script (The only one that returns…
-
0
votes1
answer200
viewsA: How do I trigger a remote Event for the server and client in the same script in ROBLOX Studio?
Well...I found out for myself. And I called this method "Master Client". Basically I added a remote Event, an Object value, a server script on workspace and a local script on…
-
0
votes1
answer200
viewsQ: How do I trigger a remote Event for the server and client in the same script in ROBLOX Studio?
I’ve already tried remoteEvent:FireAllClients() remoteEvent:FireServer() but it didn’t work. It said that FireServer could only be used by the client. I also tried: --No server script em workspace…
-
1
votes0
answers96
viewsQ: Doubt with Notepad++
How do I make Notepad++ for example: function test() var=true end instead of function test() var=true end sorry I don’t know what to call this action,but whenever I start a function or something…
-
2
votes2
answers963
viewsQ: Is there a way to use accents in strings in LUA?
I’m looking for a way to use string accents in the LUA language. I’ve tried this texto='Pão,está,cabeçalho,' Because in the engine I am using (ROBLOX studio), the game only writes until the stretch…
-
0
votes1
answer45
viewsQ: How do I wait until a condition is given in LOVE2D?
I’ve already tried timer=require'hump.timer' timer.script(function(wait) repeat wait(0) until condição but it didn’t work.I even tried to remove the wait,but the game crashed.Please help me!!!…
luaasked arthurgps2 411 -
6
votes2
answers141
viewsQ: How do I make some image invisible in love2d?
How do I set the visibility of an image in Love2d? For example, make it 10%, 25% or 50% visible.
-
2
votes2
answers75
viewsQ: How do I remove the thousandths of a value?
For example number=10.123456 how do I remove the thousandths of number so that it stays just 10.12?Help me please
luaasked arthurgps2 411 -
0
votes1
answer82
viewsQ: Is there a way to stop a Tweening in ROBLOX studio?
I want a command that stops a Tweening in ROBLOX studio, for example: frame:TweenPosition(UDim2.new(0, 200, 0, 0), "Out", "Quad", 1) But when receiving some condition, there is some way to stop this…
luaasked arthurgps2 411 -
0
votes2
answers1551
viewsA: What is the difference between repeat and while on the moon?
Think of it as if while was "while" and repeat until it was "repeat until". For example repeat wait() num=num+1 until var==true This loop will repeat until var==true already while var==true do…
luaanswered arthurgps2 411 -
3
votes1
answer95
viewsQ: How do I use Hump.timer in a repeat loop in LOVE2D?
I’m asking this to make something move in LOVE2D when a key is pressed. I’ve already tried repeat imgx = imgx + 1 timer.after(0, function() end) until not love.keyboard.isDown('left') but it didn’t…
luaasked arthurgps2 411 -
7
votes2
answers413
viewsQ: How do I return a particular character from a text?
How do I return a particular character from a text? For example: text = "Eu sou vegano" How do I detect the 5th letter of text? If anyone would help me, I’d be grateful.…
luaasked arthurgps2 411 -
0
votes1
answer54
viewsQ: Where can I download the Hump library?
On my American Stack Overflow account,I asked how I could make the game wait a certain number of seconds. One of the results was using Hump.timer, for example: function love.load() timer=require…
luaasked arthurgps2 411