need help for games utility

Questions about the LÖVE API, installing LÖVE and other support related questions go here.
Forum rules
Before you make a thread asking for help, read this.
Post Reply
User avatar
Altair
Prole
Posts: 2
Joined: Sun Nov 23, 2008 9:23 am
Location: Italy = )

need help for games utility

Post 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
<< I love löve - Io amo löve >>
W l' Italia!!
User avatar
nightvenom
Prole
Posts: 36
Joined: Sat Aug 16, 2008 3:07 pm

Re: need help for games utility

Post 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
User avatar
Altair
Prole
Posts: 2
Joined: Sun Nov 23, 2008 9:23 am
Location: Italy = )

Re: need help for games utility

Post 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" ^^
<< I love löve - Io amo löve >>
W l' Italia!!
Post Reply

Who is online

Users browsing this forum: Google [Bot] and 13 guests