Search found 151 matches
- Sun May 10, 2015 1:42 pm
- Forum: Support and Development
- Topic: "Questions that don't deserve their own thread" thread
- Replies: 905
- Views: 411563
Re: "Questions that don't deserve their own thread" thread
Exactly, I wanted to answer his question that "/" worked, I see your point only using "." since it is always correct, I already use "."
- Sat May 09, 2015 6:07 pm
- Forum: Support and Development
- Topic: "Questions that don't deserve their own thread" thread
- Replies: 905
- Views: 411563
Re: "Questions that don't deserve their own thread" thread
That's true, I tried and it worked:
Code: Select all
"assets/bump.lua"
- Sat May 09, 2015 5:50 pm
- Forum: General
- Topic: Number questions
- Replies: 9
- Views: 4281
Re: Number questions
Both solutions work for me. :) Basically I was trying to make this kind of grid: { {w,w,w,w,w,w,w,w,w} {w,0,0,0,0,0,0,0,w} {w,0,i,0,i,0,i,0,w} {w,0,0,0,0,0,0,0,w} {w,0,i,0,i,0,i,0,w} {w,0,0,0,0,0,0,0,w} {w,0,i,0,i,0,i,0,w} {w,0,0,0,0,0,0,0,w} {w,w,w,w,w,w,w,w,w} } -- i = indestructable -- w = wall -...
- Fri May 08, 2015 7:31 pm
- Forum: General
- Topic: Number questions
- Replies: 9
- Views: 4281
Number questions
Hey, been wondering this for some time. How do I compare a number too see if it's decimal or an integer?
- Fri May 08, 2015 6:31 pm
- Forum: Support and Development
- Topic: "Questions that don't deserve their own thread" thread
- Replies: 905
- Views: 411563
Re: "Questions that don't deserve their own thread" thread
Awesome. Code looks pretty.
- Fri May 08, 2015 6:27 pm
- Forum: General
- Topic: Questions about require, calling tables from files.
- Replies: 13
- Views: 6770
Re: Questions about require, calling tables from files.
That's cool. I can return functions as well. I'll add a local to the external files. Awesome.
- Fri May 08, 2015 6:14 pm
- Forum: General
- Topic: Questions about require, calling tables from files.
- Replies: 13
- Views: 6770
Re: Questions about require, calling tables from files.
Alright, so It's more clear. When assigning functions to local variables using the same approach as: -- Player file: player = {} return player -- Main file local player = require 'player' Can this be done in some way? Right now I have: -- Map generation function mapGen(t) -- Make map and return t en...
- Fri May 08, 2015 5:31 pm
- Forum: Support and Development
- Topic: "Questions that don't deserve their own thread" thread
- Replies: 905
- Views: 411563
Re: "Questions that don't deserve their own thread" thread
Hey, if I have bump.lua in a sub-folder "libs" and want to require it to a local variable, how do I do this?
I tried:
I tried:
Code: Select all
local bump = require 'libs\bump'
- Thu May 07, 2015 7:13 pm
- Forum: General
- Topic: Questions about require, calling tables from files.
- Replies: 13
- Views: 6770
Re: Questions about require, calling tables from files.
So when assigning files and libraries to local variables the do not depend on each other in the same way?
- Thu May 07, 2015 3:31 pm
- Forum: General
- Topic: Questions about require, calling tables from files.
- Replies: 13
- Views: 6770
Re: Questions about require, calling tables from files.
That's still not quite right. What you'll want to do is localize the player inside player.lua then return it at the end as though it were a function on its own. -- player.lua local player = { {x = 0, y = 0, controls = {'w','a','s','d'} } {x = 0, y = 0, controls = {'up', 'left', 'down', 'right'} } }...