Lockup after love.filesystem.require
Posted: Tue Feb 24, 2009 10:13 am
Yet another problem in which I'm certain I'm overlooking something >.< I have 3 LUA files - the first 2 work absolutely perfectly - but (as mentioned I'm doing a college project) I need to add a sort of 'company' spash logo. Instead of messing with my perfectly functioning level_one.lua and menu.lua I added a new main.lua
So as you can see - I call upon my menu.lua when the splash has been displayed for roughly 4 seconds - I also call load() on my menu.lua.
It loads up perfectly - the music starts playing and I see my main menu - however, keys do not seem to respond - so I'm guessing it's refusing to update? As mentioned the menu.lua functions perfectly when it acts as main.lua - what could be the problem here?
I use 'function load()' etc in my menu.lua - I did read it may be necesary to do 'load() = function' - any truth to this?
Code: Select all
function load()
androidsplash = love.graphics.newImage("UI/androidsplash.png")
androidsplash:setCenter(0, 0)
android_splash = love.graphics.newAnimation(androidsplash, 800, 500, 0.2)
android_splash:setMode(love.mode_once)
splashtime = 0
end
function draw()
love.graphics.draw(android_splash, 400, 250)
end
function update(dt)
android_splash:update(dt)
splashtime = splashtime + 0.01
if splashtime > 4 then
love.filesystem.require("menu.lua")
load()
end
end
It loads up perfectly - the music starts playing and I see my main menu - however, keys do not seem to respond - so I'm guessing it's refusing to update? As mentioned the menu.lua functions perfectly when it acts as main.lua - what could be the problem here?
I use 'function load()' etc in my menu.lua - I did read it may be necesary to do 'load() = function' - any truth to this?