Okay, now, what's wrong with this?function load()
gg = love.graphics.newImage("greenguy.png")
rg = love.graphics.newImage("redguy.png")
x = 200
y = 400
x2 = 200
y2 = 10
speed = 200
fl = false
fx = true
go = love.graphics.newImage("gameover.png")
end
function True()
if speed ~= 0 then
if love.keyboard.isDown(love.key_right) then
x = x + (speed * dt)
elseif love.keyboard.isDown(love.key_left) then
x = x - (speed * dt)
end
if 0 then
y2 = y2 + (speed * dt)
end
end
if x == x2 and y == y2 then
speed = speed - 200
end
if speed == 0 then
function draw()
love.graphics.draw(go, 200, 400)
end
end
end
function draw()
love.graphics.draw(gg, x, y)
love.graphics.draw(rg, x2, y2)
end
before i used the speed 200 and 0 thing to see if the player is game over, everything just moved and everything.
But i wanted a game-over function and I made it, so that if the redguy and greenguy(player) are at the same place.
Now nothing is moving anymore, and nothing's happening.