I tried it... it freezes after the loading screenZitat:
Zitat von PSPMillionaire
andi was a little confused by ur tuts on the ball and death thing
Printable View
I tried it... it freezes after the loading screenZitat:
Zitat von PSPMillionaire
andi was a little confused by ur tuts on the ball and death thing
Ya i get what your sayin now.. But now it says
"attempt to index a global 'pad' <a function value>
oh whoops(again), here is the fixed code:Zitat:
Zitat von montrob
and if it gives u another error, tell me what line its on, but this exact code worked for me.Code:white = Color.new(255, 255, 255)
background = Image.load("background.png")
mouse = Image.load("mouse1.png")
mousex = 100
mousey = 172
while true do
screen:clear()
pad = Controls.read()
screen:blit(0, 0, background, false)
screen:blit(mousex, mousey, mouse)
if pad:up() then
mousey = mousey - 1
end
if pad:down() then
mousey = mousey + 1
end
if pad:left() then
mousex = mousex - 1
end
if pad:right() then
mousex = mousex + 1
end
screen.waitVblankStart()
screen.flip()
end
ok thx now i can move on
what u working on?Zitat:
Zitat von montrob
I'll tell you once i get a little bit further..Zitat:
Zitat von Grimfate126
As for now.. what do you put for the word "AND" like this:
Code:
if mousex == 135 "AND" -- what would you put there?
if mousey == 151
What you mean like if pad:down() and pad:up() then?
if mousex == 135 and mousey == 151 then
oh.. thx lol
I got this error:
'end' expected <to close 'while' at line 10> near '<eof>'
add an end at the end of your while statment