![]() |
|
#1
|
|||
|
|||
|
Thanks
__________________
Join my PSP site here: http://splodger15.forum5.com/ |
|
#2
|
|||
|
|||
|
ok first you have to declare your pics
pic = {} pic[1] = Image.load("1.jpg") pic[2] = Image.load("2.jpg") pic[3] = Image.load("3.jpg") and so on.. then your count cnt = 1 -- from 1 so it doesnt give us a error of no pic then do this red = Color.new(255,0,0) while true do pad = Controls.read() if pad~= oldpad then if pad:cross() then cnt = cnt + 1 end if pad:triangle() then cnt = cnt - 1 end --to go to previous pic if pad:start() then break end --cant forget that:mrgreen: end if pic[cnt] then --incase no such pic screen:blit(0,0,pic[cnt]) else screen:print(0,0,"Sorry no such pic",red) end screen:flip() end Hope it helps =)
__________________
![]() \"Death be not proud, some have called thee mighty and great, thou art not so\" |
|
#3
|
|||
|
|||
|
Thanks i will give that a try
__________________
Join my PSP site here: http://splodger15.forum5.com/ |
|
#4
|
|||
|
|||
|
I tried that and it worked but my images show and when i press x nothing happens
__________________
Join my PSP site here: http://splodger15.forum5.com/ |
|
#5
|
|||
|
|||
|
i dont know what u mean by they show but x does nothing?
__________________
![]() \"Death be not proud, some have called thee mighty and great, thou art not so\" |
|
#6
|
|||
|
|||
|
my first image shows then you press x and then nothing happens it just stays on that image is what you posted i added my images
pic = {} pic[1] = Image.load("images/1.PNG") pic[2] = Image.load("images/2.PNG") pic[3] = Image.load("images/3.PNG") pic[4] = Image.load("images/4.PNG") cnt = 1 cnt = 2 cnt = 3 cnt = 4 red = Color.new(255,0,0) while true do pad = Controls.read() if pad~= oldpad then if pad:cross() then cnt = cnt + 1 end if pad:triangle() then cnt = cnt - 1 end if pad:start() then break end end if pic[cnt] then screen:blit(0,0,pic[cnt]) else screen:print(0,0,"Sorry no such pic",red) end screen:flip() end
__________________
Join my PSP site here: http://splodger15.forum5.com/ |
|
#7
|
|||
|
|||
|
dude u have to use one count starting at 1, what u have done is made your count = 4.
so take out the: cnt = 2 cnt = 3 cnt = 4 and have only this in its place: cnt = 1 now try it sorry for late reply =) . o and sorry forgot a line of code ( My bad =) ) cnt = 1 red = Color.new(255,0,0) while true do pad = Controls.read() if pad~= oldpad then if pad:cross() then cnt = cnt + 1 end if pad:triangle() then cnt = cnt - 1 end if pad:start() then break end oldpad = pad -------Sorry forgot this end if pic[cnt] then screen:blit(0,0,pic[cnt]) else screen:print(0,0,"Sorry no such pic",red) end screen:flip() end
__________________
![]() \"Death be not proud, some have called thee mighty and great, thou art not so\" |
|
#8
|
|||
|
|||
|
Thank you so much its finally working
__________________
Join my PSP site here: http://splodger15.forum5.com/ |
|
#9
|
|||
|
|||
|
use this code to load the image
Code:
"name"=Image.load("images/name.jpg")
Code:
if pad:cross() then screen.blit (0,0, name ,false) screen.flip() end
__________________
![]() Email me your lua scripts ill fix them or help you fix them and Email you back on what you wanted :D |
![]() |
|
|
|||
|
|||
|
|
| Thread Tools | |
| Display Modes | |
|
|