View cmd and a command to turn off the window
Forum rules
Before you make a thread asking for help, read this.
Before you make a thread asking for help, read this.
-
- Prole
- Posts: 19
- Joined: Sun Jan 29, 2012 5:03 pm
Re: View cmd and a command to turn off the window
It worked, thank you
- Robin
- The Omniscient
- Posts: 6506
- Joined: Fri Feb 20, 2009 4:29 pm
- Location: The Netherlands
- Contact:
Re: View cmd and a command to turn off the window
It doesn't. It calls love.conf() before main.lua is loaded.Jasoco wrote:I didn't know the love.conf() function worked inside main.lua. (I never tested it myself.)
Help us help you: attach a .love.
- Jasoco
- Inner party member
- Posts: 3727
- Joined: Mon Jun 22, 2009 9:35 am
- Location: Pennsylvania, USA
- Contact:
Re: View cmd and a command to turn off the window
And there you go. That was the problem. I suspected as much when you uploaded a main.lua instead of a .love file.
-
- Prole
- Posts: 19
- Joined: Sun Jan 29, 2012 5:03 pm
Re: View cmd and a command to turn off the window
Thank you all for your response
Now I just want my window closes and the command prompt is 10 seconds, it's possible?
Now I just want my window closes and the command prompt is 10 seconds, it's possible?
- Robin
- The Omniscient
- Posts: 6506
- Joined: Fri Feb 20, 2009 4:29 pm
- Location: The Netherlands
- Contact:
Re: View cmd and a command to turn off the window
Huh? Maybe you could ask your question in French, so someone here who is good in both English and French can help you.lecrafteur wrote:Now I just want my window closes and the command prompt is 10 seconds, it's possible?
Help us help you: attach a .love.
-
- Prole
- Posts: 19
- Joined: Sun Jan 29, 2012 5:03 pm
Re: View cmd and a command to turn off the window
Ok !
Bon je la poste en français,
je voudrais que quand ma fenêtre est éteinte,le cmd reste allumé pendant quelque seconde,sinon voici le code:
Bon bah merci si vous trouvez mon problème !
Bon je la poste en français,
je voudrais que quand ma fenêtre est éteinte,le cmd reste allumé pendant quelque seconde,sinon voici le code:
Code: Select all
if life < dead then
print("GAME OVER")
print("Votre score:"..score)
print("Votre manche:"..manche)
love.event.push('q')
end
- Robin
- The Omniscient
- Posts: 6506
- Joined: Fri Feb 20, 2009 4:29 pm
- Location: The Netherlands
- Contact:
Re: View cmd and a command to turn off the window
I don't even speak French, but now I know what you mean.
First, you probably will want to stop using the console for things like printing scores, and printing them on your game window instead.
Secondly, you'll need a timer:
First, you probably will want to stop using the console for things like printing scores, and printing them on your game window instead.
Secondly, you'll need a timer:
Code: Select all
-- other code
function love.update(dt)
--other code
if not time_dead then
if life < dead then
print("GAME OVER")
print("Votre score:"..score)
print("Votre manche:"..manche)
time_dead = 0
else
time_dead = time_deat + dt
if time_dead > 10 then -- to wait 10 seconds. Use 1, if you want to wait 1 second
love.event.push('q')
end
end
end
--other code
Help us help you: attach a .love.
-
- Prole
- Posts: 19
- Joined: Sun Jan 29, 2012 5:03 pm
Re: View cmd and a command to turn off the window
Merci,mais il y a un problème
time_deat n'existe pas et sa fait planter le jeux.
Sinon merci et google traduction est ton ami
time_deat n'existe pas et sa fait planter le jeux.
Sinon merci et google traduction est ton ami
- Robin
- The Omniscient
- Posts: 6506
- Joined: Fri Feb 20, 2009 4:29 pm
- Location: The Netherlands
- Contact:
Re: View cmd and a command to turn off the window
Oh, silly me. I forgot an end:
That should work.
Code: Select all
-- other code
function love.update(dt)
--other code
if not time_dead then
if life < dead then
print("GAME OVER")
print("Votre score:"..score)
print("Votre manche:"..manche)
time_dead = 0
end -- this one
else
time_dead = time_deat + dt
if time_dead > 10 then -- to wait 10 seconds. Use 1, if you want to wait 1 second
love.event.push('q')
end
end
end
--other code
Help us help you: attach a .love.
Re: View cmd and a command to turn off the window
Je crois que time_deat est un typo. Ça devrait être time_dead.lecrafteur wrote:Merci,mais il y a un problème
time_deat n'existe pas et sa fait planter le jeux.
(time_deat is a typo, right?)
Who is online
Users browsing this forum: Bing [Bot] and 0 guests