Im not sure what else to say , its kinda self explanatory...
my .love file is available here (attachments wont work)
-removed by me as no longer needed-
My second gameState wont show up...
Forum rules
Before you make a thread asking for help, read this.
Before you make a thread asking for help, read this.
My second gameState wont show up...
Last edited by Vandie on Thu Oct 31, 2013 12:44 pm, edited 1 time in total.
Code: Select all
Dear Math, please grow up and solve your own problems, I'm tired of solving them for you...
Code: Select all
How can you make sure you never miss your target? Shoot first, and whatever you hit, call it the target.
Re: My second gameState wont show up...
guys please , ii really need your help here...
Code: Select all
Dear Math, please grow up and solve your own problems, I'm tired of solving them for you...
Code: Select all
How can you make sure you never miss your target? Shoot first, and whatever you hit, call it the target.
Re: My second gameState wont show up...
Hi,
bumping your topic after waiting for one day is considered impolite here. Please be a bit more patient in the future. And by the way you can upload .love files directly in the forum post.
To get feedback more quickly next time, try to formulate the problem you face more precisely. In this case, your description was long enough to understand the problem, but only after I looked into your code. I personally usually try to estimate how much effort it would be to help people on the forum, before I even download their code. Hopefully that helps you get feedback more quickly.
Here is the anser:
The problem is that you define the function love.update in the wrong places. In your main.lua you should have a function called love.update. And in all other files you have, you may have update functions but they have to have different names. So in cLogo.lua you should call it, e.g. clogo.update(dt) ...
Then the main update function becomes
bumping your topic after waiting for one day is considered impolite here. Please be a bit more patient in the future. And by the way you can upload .love files directly in the forum post.
To get feedback more quickly next time, try to formulate the problem you face more precisely. In this case, your description was long enough to understand the problem, but only after I looked into your code. I personally usually try to estimate how much effort it would be to help people on the forum, before I even download their code. Hopefully that helps you get feedback more quickly.
Here is the anser:
The problem is that you define the function love.update in the wrong places. In your main.lua you should have a function called love.update. And in all other files you have, you may have update functions but they have to have different names. So in cLogo.lua you should call it, e.g. clogo.update(dt) ...
Then the main update function becomes
Code: Select all
function love.update(dt)
if gameState == 'intro' then
cLogo.update(dt)
elseif gameState == 'L2d' then
L2dIntro.update(dt)
end
end
Check out my blog on gamedev
Re: My second gameState wont show up...
Sorry, Normally i would wait but i have adeadline to have this bit finnished by (i know its a bad excuse0 but thats alll i got)
anyway thanks for the help, i keep struggeling to finnish said section and i couldn't get it to work.
anyway thanks for the help, i keep struggeling to finnish said section and i couldn't get it to work.
Code: Select all
Dear Math, please grow up and solve your own problems, I'm tired of solving them for you...
Code: Select all
How can you make sure you never miss your target? Shoot first, and whatever you hit, call it the target.
Re: My second gameState wont show up...
There's also another way to do it, similar to the examples. Whenever you load a new "scene", it overrides love.update and love.draw. Then, when you get back, you override them again.
Though doing as suggested by micha seems cleaner.
Though doing as suggested by micha seems cleaner.
Who is online
Users browsing this forum: Amazon [Bot], Bing [Bot] and 4 guests