how do i load a file if my cursor goes over a certain pixel?
Printable View
how do i load a file if my cursor goes over a certain pixel?
Is there a way to control two cursors, one with the directional pads and one with the X, O, []... buttons at the same time so that you can play twoplayer stuff? And if so, can it be made using functions?
/Lingon =)
i believe that is possible
and sg57, i would help out with that, but i am not real sure how to do it
alright so im making a little gmae just for me and my pals. I won't be sending it to pspu because the fact that its really noobish and sloppy and a bunch of other things. But anyway. I want to make a hidden bonus content kinda thing that will display pics when you press a button. I have the hidden key combo done and the button pushing thing done. My only thing is when you display the hidden content it doesn't let you exit. Ive tried everything from adding the whole break thing in it in diff places and nothing works. this is the snippet of code that im having trouble with:
Zitat:
spad = Controls.read()
if spad:l() and spad:r() and spad:down() and spad:select() then do
screen:clear()
screen:print(10,130,"U figured it out. Enjoy!",green)
screen.flip()
if spad:start() then
break
end
while true do
mpad = Controls.read()
if mpad:cross() then
screen:clear()
screen:blit(0,0,bonusimg)
screen.flip()
screen.waitVblankStart()
end
if mpad:triangle() then
screen:clear()
screen:blit(0,0,bonusimg2 )
screen.flip()
screen.waitVblankStart()
end
if mpad:square() then
screen:clear()
screen:blit(0,0,bonusimg3 )
screen.flip()
screen.waitVblankStart()
end
if mpad:circle() then
screen:clear()
screen:blit(0,0,bonusimg4 )
screen.flip()
screen.waitVblankStart()
end
end
end
end
end
Help please!
bonusimg = Image.load(" ")
bonusimg2 = Image.load(" ")
bonusimg3 = Image.load(" ")
bonusimg4 = Image.load(" ")
function start()
while true do
pad = Controls.read()
if pad:ltrigger() then
if pad:rtrigger() then
if pad:down() then
if pad:select() then
screen:clear()
screen.print(10,130,"U figured it out. Enjoy!",green)
screen.flip()
ending()
end
end
end
end
if pad:start() then
break
end
end
end
function ending()
while true do
pad = Controls.read()
if pad:cross() then
screen:clear()
screen:blit(0,0,bonusimg)
screen.waitVblankStart()
screen.flip()
end
if pad:triangle() then
screen:clear()
screen:blit(0,0,bonusimg2 )
screen.waitVblankStart()
screen.flip()
end
if pad:square() then
screen:clear()
screen:blit(0,0,bonusimg3 )
screen.waitVblankStart()
screen.flip()
end
if pad:circle() then
screen:clear()
screen:blit(0,0,bonusimg4 )
screen.waitVblankStart()
screen.flip()
end
end
end
So how do I do that?
take out the end function and just say while true do and controls.read cause end already has a function
sorry IchigoKurosaki but your code didn't work. i figured it out. I had to put the
if spad:start() then
break
end
and the
if mpad:start() then
break
end
directly under the controls.read() function. I got it to work and its coming along. Thanks for trying tho guys! :D
*shrugs* whatever works for you :icon_biggZitat:
Zitat von InhumanElmo