Yes, I'm working on yet ANOTHER project and have hit yet ANOTHER problem. The player animation for moving up and down won't play, and the animation for moving left and right won't stop. The purple areas on Link's sprite sheet are unused. It's based off a platformer engine by Sean Laurvick (at least, that's what it says in the files), so there are bound to be some bugs in it. (Also the scaling in the options screen isn't working. I coded in the scaling and tried the advice I got when I was scaling that Mega Man engine and it didn't work so I removed the code.) I'm sure there's something as obvious as the screen on this laptop (I'm sorry, I couldn't think of anyting else) that I'm missing, but I'm not sure what it would be.
I know I didn't ask the ripper of the font (Desgardes from the Spriters Resource) for permission, but I'm going to ask the project leader (Crownjo from Exploding Rabbit Forums) to rip the font so I don't have to ask or even credit Desgardes.
Also, for some reason, when it's compressed, it uses the default LOVE screen size, but unpacked it works the way it should.
On a side note, the first thing done in the whole program apart from the stuff in the config file is setting the background color to white. This is done to save energy on LCD screens.
Animation won't stop, can't tell what went wrong
Forum rules
Before you make a thread asking for help, read this.
Before you make a thread asking for help, read this.
- Roland_Yonaba
- Inner party member
- Posts: 1563
- Joined: Tue Jun 21, 2011 6:08 pm
- Location: Ouagadougou (Burkina Faso)
- Contact:
Re: Animation won't stop, can't tell what went wrong
Make sure to create a configuration file.Mario-Fan wrote: Also, for some reason, when it's compressed, it uses the default LOVE screen size, but unpacked it works the way it should.
Re: Animation won't stop, can't tell what went wrong
Except that there already is one, skimmer.Roland_Yonaba wrote:Make sure to create a configuration file.Mario-Fan wrote: Also, for some reason, when it's compressed, it uses the default LOVE screen size, but unpacked it works the way it should.
- Roland_Yonaba
- Inner party member
- Posts: 1563
- Joined: Tue Jun 21, 2011 6:08 pm
- Location: Ouagadougou (Burkina Faso)
- Contact:
Re: Animation won't stop, can't tell what went wrong
Also, make sure use the stop() method on your playerSprites object. Fact is, when starting love.update, you use playerSprites:start(), which causes an internal variable, isRunning, to be always true. Hence, the animation will be played anytime.
Haven't tried, but that might solve the problem.
Code: Select all
function love.update(dt)
if gameState == "ingame" then
-- check controls
if love.keyboard.isDown("right") then
playerSprites:start()
...
end
if love.keyboard.isDown("left") then
playerSprites:start()
...
end
... etc
end
end
...
[code]function love.keyreleased(key)
...
if (key == "right") or (key == "left") then
p:stopX()
playerSprites:stop()
end
if (key == "up") or (key == "down") then
p:stopY()
playerSprites:stop()
end
...
Oh, really ? Can't see it, though.Mario-Fan wrote:Except that there already is one, skimmer.Roland_Yonaba wrote:Make sure to create a configuration file.Mario-Fan wrote: Also, for some reason, when it's compressed, it uses the default LOVE screen size, but unpacked it works the way it should.
Re: Animation won't stop, can't tell what went wrong
Roland_Yonaba wrote:Also, make sure use the stop() method on your playerSprites object. Fact is, when starting love.update, you use playerSprites:start(), which causes an internal variable, isRunning, to be always true. Hence, the animation will be played anytime.
Haven't tried, but that might solve the problem.Code: Select all
function love.update(dt) if gameState == "ingame" then -- check controls if love.keyboard.isDown("right") then playerSprites:start() ... end if love.keyboard.isDown("left") then playerSprites:start() ... end ... etc end end ... [code]function love.keyreleased(key) ... if (key == "right") or (key == "left") then p:stopX() playerSprites:stop() end if (key == "up") or (key == "down") then p:stopY() playerSprites:stop() end ...
For the code mistake, OMG that's some of a leftover attempt at stopping the standing sprite from flashing purple. It's still not fixed though. For the missing conf file, god dammit I hate this laptop's lack of Winrar. (alsoi'musing3gandit'snotstayingconnectedforverylongwhichissuperannoying)
Oh, really ? Can't see it, though.
Who is online
Users browsing this forum: No registered users and 3 guests