Page 1 of 1

need help for games utility

Posted: Fri Dec 05, 2008 4:41 pm
by Altair
Hi guy,
i'm trying to subdivide my löve game in more .lua file.
My problem is that i don't know how to open a different .lua file in the same window (also closing the previous).
I take a look to the "examples" that have a simple menu that allows you to see the example you select. But I don't understand what are "exf" or nothing else, because study LUA only a few at school...
Can you help me? :)

P.S. There isn't any italian community about löve? :o I only ask XD

Re: need help for games utility

Posted: Fri Dec 05, 2008 7:16 pm
by nightvenom
Are you asking to have 2 separate windows in your game/program open at once, or are you asking if you can use multiple .lua files to build your program/game ?

If you want the second method then just put this above everything in your program:

Code: Select all

 love.filesystem.require("menuSystem.lua") --Runs the LUA file Once. 
or

Code: Select all

 love.filesystem.include("menuSystem.lua") --Runs the LUA more then once. 
:)
and, i do not know about any Italian communities here, I'm Canadian :D

Found in the documentation here: http://love2d.org/docs/love_filesystem.html

Re: need help for games utility

Posted: Sat Dec 06, 2008 1:58 pm
by Altair
yeah I only want a menu that open other .lua files in the same window, like the examples.
I will try with "love.filesystem.require" ^^