 |
forums.ps2dev.org Homebrew PS2, PSP & PS3 Development Discussions
|
| View previous topic :: View next topic |
| Author |
Message |
Legacyxero

Joined: 12 Sep 2008 Posts: 23
|
Posted: Wed Sep 17, 2008 4:03 pm Post subject: lua n00b question. |
|
|
Heres my issue. at the the transition from (Pressing start to play) to (loading "intro) I dont want to use the command
"screen.waitVblankStart()"
because i dont want it to wait. I want it to stay there UNTILL I press start!!
what should I do to display "intro" (its a picture that takes up the whole screen) after I press start also.
So here is my code:
pink = Color.new(255, 0 , 153)
blue = Color.new(0 , 153, 255)
orange = Color.new(255, 102, 0)
gray = Color.new(153, 153, 153)
black = Color.new(0 , 0 , 0)
green = Color.new(0, 255, 0)
white = Color.new(225, 225, 225)
--*****LOADING SCREEN*****
screen:print(194, 136, "Loading: 0%", blue)
screen.flip()
screen.waitVblankStart(60)
screen:clear()
intro = Image.load("abaddonsparrable/introscreen.png")
screen:print(194, 136, "Loading: 20%", blue)
screen.flip()
screen.waitVblankStart(60)
screen:clear()
lvlone = Image.load("abaddonsparrable/levelone intro.png")
screen:print(194, 136, "Loading: 40%", blue)
screen.flip()
screen.waitVblankStart(60)
screen:clear()
story = Image.load("abaddonsparrable/story.png")
screen:print(194, 136, "Loading: 60%", blue)
screen.flip()
screen.waitVblankStart(60)
screen:clear()
choiceone = Image.load("abaddonsparrable/choice1.png")
screen:print(194, 136, "Loading: 80%", blue)
screen.flip()
screen.waitVblankStart(60)
screen:clear()
screen:print(194, 136, "Loading: 100%", blue)
screen.flip()
screen.waitVblankStart(60)
screen:clear()
screen:print(194, 136, "Press START to play", white)
screen.flip()
pad = Controls.read()
if pad:start() then
screen:clear()
screen:blit(0, 0, intro)
screen.flip()
end _________________ [IMG]http://img115.exs.cx/img115/638/Sephiroth3.jpg[/IMS] |
|
| Back to top |
|
 |
Legacyxero

Joined: 12 Sep 2008 Posts: 23
|
Posted: Thu Sep 18, 2008 4:49 am Post subject: |
|
|
can someone please help me?! _________________ [IMG]http://img115.exs.cx/img115/638/Sephiroth3.jpg[/IMS] |
|
| Back to top |
|
 |
-DaRealXecon-
Joined: 09 Jul 2008 Posts: 31
|
Posted: Thu Sep 18, 2008 5:52 am Post subject: |
|
|
| Code: |
pink = Color.new(255, 0 , 153)
blue = Color.new(0 , 153, 255)
orange = Color.new(255, 102, 0)
gray = Color.new(153, 153, 153)
black = Color.new(0 , 0 , 0)
green = Color.new(0, 255, 0)
white = Color.new(225, 225, 225)
--*****LOADING SCREEN*****
screen:print(194, 136, "Loading: 0%", blue)
screen.flip()
screen.waitVblankStart(60)
screen:clear()
intro = Image.load("abaddonsparrable/introscreen.png")
screen:print(194, 136, "Loading: 20%", blue)
screen.flip()
screen.waitVblankStart(60)
screen:clear()
lvlone = Image.load("abaddonsparrable/levelone intro.png")
screen:print(194, 136, "Loading: 40%", blue)
screen.flip()
screen.waitVblankStart(60)
screen:clear()
story = Image.load("abaddonsparrable/story.png")
screen:print(194, 136, "Loading: 60%", blue)
screen.flip()
screen.waitVblankStart(60)
screen:clear()
choiceone = Image.load("abaddonsparrable/choice1.png")
screen:print(194, 136, "Loading: 80%", blue)
screen.flip()
screen.waitVblankStart(60)
screen:clear()
screen:print(194, 136, "Loading: 100%", blue)
screen.flip()
screen.waitVblankStart(60)
screen:clear()
while true do
screen:print(194, 136, "Press START to play", white)
screen.flip()
screen.waitVblankStart()
pad = Controls.read()
if pad:start() then
for a=1,1 do
screen:clear()
screen:blit(0, 0, intro)
screen.flip()
System.sleep(seconds)
end
dofile("something.lua")
end
end
|
I don't speak English very well... Therefore, i can you not really explain :p
Sorry... :(
Do you Speak German? :)[/code] |
|
| Back to top |
|
 |
Legacyxero

Joined: 12 Sep 2008 Posts: 23
|
Posted: Thu Sep 18, 2008 8:46 am Post subject: |
|
|
sorry, nein schpecken ze deutch. _________________ [IMG]http://img115.exs.cx/img115/638/Sephiroth3.jpg[/IMS] |
|
| Back to top |
|
 |
Legacyxero

Joined: 12 Sep 2008 Posts: 23
|
Posted: Thu Sep 18, 2008 9:33 am Post subject: |
|
|
ok, so i am just saying fuck the "press START to play", its redundant anyway...
but now what i want to do is: after the loading screen ends, i want to load that same picture (Intro) that take up the whole screen. I want that picture to stay on the screen till i press X, then I want it to load ANOTHER picture that takes up the whole screen.
from reading tutorials this is what I have gathered...(my problem's at the end of the code)
| Code: |
pink = Color.new(255, 0 , 153)
blue = Color.new(0 , 153, 255)
orange = Color.new(255, 102, 0)
gray = Color.new(153, 153, 153)
black = Color.new(0 , 0 , 0)
green = Color.new(0, 255, 0)
white = Color.new(225, 225, 225)
--*****LOADING SCREEN*****
screen:print(194, 136, "Loading: 0%", blue)
screen.flip()
screen.waitVblankStart(60)
screen:clear()
intro = Image.load("abaddonsparrable/introscreen.png")
screen:print(194, 136, "Loading: 20%", blue)
screen.flip()
screen.waitVblankStart(60)
screen:clear()
lvlone = Image.load("abaddonsparrable/levelone intro.png")
screen:print(194, 136, "Loading: 40%", blue)
screen.flip()
screen.waitVblankStart(60)
screen:clear()
story = Image.load("abaddonsparrable/story.png")
screen:print(194, 136, "Loading: 60%", blue)
screen.flip()
screen.waitVblankStart(60)
screen:clear()
choiceone = Image.load("abaddonsparrable/choice1.png")
screen:print(194, 136, "Loading: 80%", blue)
screen.flip()
screen.waitVblankStart(60)
screen:clear()
screen:print(194, 136, "Loading: 100%", blue)
screen.flip()
screen.waitVblankStart(60)
screen:clear()
pad = Controls.read()
while true do
screen:blit(0, 0, intro)
if pad:cross() then break end
screen:blit(0, 0, lvlone)
end
|
My buddy told me that should work, but it just freezes at the 100% screen.
someone please help me. _________________ [IMG]http://img115.exs.cx/img115/638/Sephiroth3.jpg[/IMS] |
|
| Back to top |
|
 |
Legacyxero

Joined: 12 Sep 2008 Posts: 23
|
Posted: Thu Sep 18, 2008 9:49 am Post subject: |
|
|
OK, ALMOST got it fixed. This is what I got:
| Code: |
pink = Color.new(255, 0 , 153)
blue = Color.new(0 , 153, 255)
orange = Color.new(255, 102, 0)
gray = Color.new(153, 153, 153)
black = Color.new(0 , 0 , 0)
green = Color.new(0, 255, 0)
white = Color.new(225, 225, 225)
--*****LOADING SCREEN*****
screen:print(194, 136, "Loading: 0%", blue)
screen.flip()
screen.waitVblankStart(60)
screen:clear()
intro = Image.load("abaddonsparrable/introscreen.png")
screen:print(194, 136, "Loading: 20%", blue)
screen.flip()
screen.waitVblankStart(60)
screen:clear()
lvlone = Image.load("abaddonsparrable/levelone intro.png")
screen:print(194, 136, "Loading: 40%", blue)
screen.flip()
screen.waitVblankStart(60)
screen:clear()
story = Image.load("abaddonsparrable/story.png")
screen:print(194, 136, "Loading: 60%", blue)
screen.flip()
screen.waitVblankStart(60)
screen:clear()
choiceone = Image.load("abaddonsparrable/choice1.png")
screen:print(194, 136, "Loading: 80%", blue)
screen.flip()
screen.waitVblankStart(60)
screen:clear()
screen:print(194, 136, "Loading: 100%", blue)
screen.flip()
screen.waitVblankStart(60)
screen:clear()
pad = Controls.read()
while true do
screen:blit(0, 0, intro)
screen.flip()
if pad:cross() then break
end
screen:blit(0, 0, lvlone)
screen.flip()
end
|
It loads the loading screen fine, but when it comes time to display the first image, it displays both images... I guess thats what its doing cause the screen is flashing between the intro and lvlone. _________________ [IMG]http://img115.exs.cx/img115/638/Sephiroth3.jpg[/IMS] |
|
| Back to top |
|
 |
J.F.
Joined: 22 Feb 2004 Posts: 2906
|
Posted: Thu Sep 18, 2008 11:14 am Post subject: |
|
|
| This isn't a PSP question. Sounds like you just need more lessons in Lua, and we don't do that here. Once you have this working on a PC, then have some PSP specific questions, ask those. |
|
| Back to top |
|
 |
angelo
Joined: 29 Aug 2007 Posts: 168
|
Posted: Sun Oct 12, 2008 8:11 am Post subject: |
|
|
It's amazing how he's managed to fill the thread with his own replies... truly facinating.
Sorry I spaced out! |
|
| Back to top |
|
 |
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
Powered by phpBB © 2001, 2005 phpBB Group
|