Hello. I have a quick question.
I have my main.lua file, but how do I include multiple lua files and have them run on load? It gets really messy with ALL the code in one single file.
Thanks.
EDIT:
I also have another question:
Several functions on the wiki state they have "modes". For example, the rectangle. The wiki does not give a list of all available modes, however. If you can tell me of a place where I can see all available modes of any function that has a "mode" argument, that would be great. If not, people who know all available modes should consider listing them in their corresponding function on the wiki.
Including multiple files into the game/program
Forum rules
Before you make a thread asking for help, read this.
Before you make a thread asking for help, read this.
- bartbes
- Sex machine
- Posts: 4946
- Joined: Fri Aug 29, 2008 10:35 am
- Location: The Netherlands
- Contact:
Re: Including multiple files into the game/program
First question:
Check out the lua function require, it works almost the same in LÖVE, except the . syntax seems a little buggy... so you might want to use /. (that dot is not part of the replacement btw)
Second question:
"line" and "fill"
Check out the lua function require, it works almost the same in LÖVE, except the . syntax seems a little buggy... so you might want to use /. (that dot is not part of the replacement btw)
Second question:
"line" and "fill"
Re: Including multiple files into the game/program
That's only for one function. I meant ANY function that has a "mode" argument.bartbes wrote:Second question:
"line" and "fill"
- bartbes
- Sex machine
- Posts: 4946
- Joined: Fri Aug 29, 2008 10:35 am
- Location: The Netherlands
- Contact:
Re: Including multiple files into the game/program
AFAIK those are the modes for all of those functions.
- Robin
- The Omniscient
- Posts: 6506
- Joined: Fri Feb 20, 2009 4:29 pm
- Location: The Netherlands
- Contact:
Re: Including multiple files into the game/program
Click on the type of the mode. That gives you a list.Divran wrote:That's only for one function. I meant ANY function that has a "mode" argument.bartbes wrote:Second question:
"line" and "fill"
Help us help you: attach a .love.
- bartbes
- Sex machine
- Posts: 4946
- Joined: Fri Aug 29, 2008 10:35 am
- Location: The Netherlands
- Contact:
Re: Including multiple files into the game/program
Oh, THOSE modes... aren't they all clickable?
Re: Including multiple files into the game/program
Ah thanks. Didn't see that was a link.Robin wrote:Click on the type of the mode. That gives you a list.Divran wrote:That's only for one function. I meant ANY function that has a "mode" argument.bartbes wrote:Second question:
"line" and "fill"
And thanks, require worked.
Who is online
Users browsing this forum: Google [Bot] and 8 guests