Aaah! Thanks alot dude! =)
Printable View
Aaah! Thanks alot dude! =)
anyone know what might be wrong with this code? it wont load on my psp
background = Image.load("background.pn g")
white1 = Image.load("white1.png")
white2 = Image.load("white2.png")
white3 = Image.load("white3.png")
white4 = Image.load("white4.png")
while true do
screen:blit(0, 0, background, false)
function white1()
screen:blit(0, 0, white1)
screen.flip()
screen.waitVblankStart()
end
function white2()
screen:blit(0, 0, white2)
screen.flip()
screen.waitVblankStart(12 0)
end
function white3()
screen:blit(0, 0, white3)
screen.flip()
screen.waitVblankStart(12 0)
end
function white4()
screen:blit(0, 0, white4)
screen.flip()
screen.waitVblankStart(12 0)
end
pad = Controls.read()
if pad:square() then
white1()
end
if pad:circle() then
white2()
end
if pad:triangle() then
white3()
end
if pad:cross() then
white4()
end
What does the error message say? Oh, and you never flip the backround =)
montrob, this would make it smaller at least. Dont know if it would fix your prob tho.
Code:background=Image.load("background.png")
white1=Image.load("white1.png")
white2=Image.load("white2.png")
white3=Image.load("white3.png")
white4=Image.load("white4.png")
function white(IMAGE)
screen:blit(0,0,IMAGE)
screen.waitVblankStart(120) -keep on screen
end
while true do
pad=Controls.read()
screen:blit(0, 0, background, false)
if pad:square() then white(white1)
elseif pad:circle() then white(white2)
elseif pad:triangle() then white(white3)
elseif pad:cross() then white(white4)
end
screen.waitVblankStart()
screen.flip()
end
EDIT: original thread ----->HEREZitat:
Zitat von hooger
thats me ^^ need help...
.....sadly complete n00b please be gentle.....
i modded my xbox yay! now i have a better internet browser! i shall continue my LUA project!
hmm i need some help on how to press a key and it displays Text this is my code right now
Code:if pad:cross() then
screen:print(40, 150, cross "Welcome to the Tutorial For pspBaller, blue)
screen.flip()
end
try this if it doesnt work let me knowZitat:
Zitat von KINGOFNOOBS
and you do haveCode:if pad:cross() then
screen:print(40, 150, "Welcome to the Tutorial For pspBaller, blue)
screen.flip()
screen.waitVblankStart()
end
in there right?Code:pad = Controls.read
doesnt work... :( heres all my code
Code:yellow = Color.new(255, 255, 0)
blue = Color.new(0, 0, 255)
orange = Color.new(223, 88, 6)
grey = Color.new(94, 97, 111)
black = Color.new(0, 0, 0)
screen:print(150, 130, "Welcome To pspBaller Beta!", blue)
screen.flip()
while true do
screen.waitVblankStart(180)
screen:clear()
screen:print(40, 150, "Thank you for waiting, now Press X for Tutorial", blue)
screen.flip()
pad = Controls.read()
if pad:cross() then
screen:print(40, 150, "Welcome to the Tutorial For pspBaller, blue)
screen.flip()
screen.waitVblankStart()
end
end
there ya go. added a background too =) just make sure you hold "X" as soon as it says press "X", until the text you want to appear appears, just to make sure it works.
welcome :)Code:yellow = Color.new(255, 255, 0)
blue = Color.new(0, 0, 255)
orange = Color.new(223, 88, 6)
grey = Color.new(94, 97, 111)
black = Color.new(0, 0, 0)
background = Image.load("background.png")
screen:blit(0, 0, background, false)
screen.flip()
screen.waitVblankStart(120)
screen:blit(0, 0, background, false)
screen:print(150, 130, "Welcome To pspBaller Beta!", blue)
screen.flip()
screen.waitVblankStart(180)
screen:blit(0, 0, background, false)
screen:print(40, 150, "Thank you for waiting, now Press X for Tutorial", blue)
screen.flip()
screen.waitVblankStart(120)
pad = Controls.read()
if pad:cross() then
screen:blit(0, 0, background, false)
screen:print(40, 150, "Welcome to the Tutorial For pspBaller", blue)
screen.flip()
screen.waitVblankStart(400)
end