Zitat:
Zitat von natan333
also, your screen.waitVblankStart() should come BEFORE your screen:flip()
Printable View
Zitat:
Zitat von natan333
also, your screen.waitVblankStart() should come BEFORE your screen:flip()
is it possible for you to put the code showing the correct way ?
This is my problem:
a = 2
b = a - 1.
tempa = a
a = b
b = tempa
somehow, they both equal one, instead of a = 1 and b = 2.
Try that. and the array was the letterPos={} thing.Code:while true do
blue=Color.new(0,200,350)
screen:clear()
letterPosx = 200
letterPosy = 100
screen:print(letterPosx, letterPosy, "HELLO", blue)
pad = Controls.read()
if pad:circle() then letterPosx = letterPosx + 5 end
if pad:select() then
break
end
screen.flip()
screen.waitVblankStart()
end
Ok I got it working, Moving =P but if i release the button , it comes back =/
what do i do to make it stay ?Code:while true do
blue=Color.new(0,200,350)
screen:clear()
letterPosx = 200, 200
letterPosy = 150, 150
pad = Controls.read()
if pad:cross() then letterPosx = letterPosx + 10 end
screen:print(letterPosx, letterPosy, "HELLO", blue)
if pad:select() then
break
end
screen.waitVblankStart()
screen.flip()
end
try this:Zitat:
Zitat von natan333
it should workCode:blue = Color.new(0,200,350)
letterPosx = 200
letterPosy = 150
while true do
pad = Controls.read()
screen:print(letterPosx, letterPosy, "HELLO", blue)
if pad:cross() then
screen:clear()
letterPosx = letterPosx + 10
end
if pad:select() then
break
end
screen.waitVblankStart()
screen.flip()
end
yeah i learned now =PPPPPP Thanks Guys
now i have to learn how to make it attomatic
i saw source of an example of moving Hello Word, and it has Time in there, but have no idea how to change the pad to move attomatic =P :PC:
someone please answer my question (see above)
to overwrite the pad to be attomatic i have to overwrite this?Code:time = 0
pi = math.atan(1) * 4
while true do
screen:clear()
x = math.sin(pi * 2 / 360 * time) * 150 + 192.5
screen:print(x, 100, "HELLO", blue)
time = time + 1
if time >= 360 then
time = 0
end
or i can keep the "letterPosx = 200
letterPosy = 150"?
guys what do i replace if pad:circle() to make it attomatic so it moves by it self with out pressing a button ?