PSP Hacks

#1 Spot for PSP Hacks



Home | PSP News | PSP Hacks | PSP Saves | PSP Downloads | PSP Backgrounds | PSP Hacks Live Chat | Free PSP | Contact Us


You are not logged in.

Announcement

#1  2008-06-02 12:56:28

Organized_Chaos
PSP Smarty
From: Neosho, MO
Registered: 2008-05-14
Posts: 122
Website

how do i make the text stay on the screen?

Here is my code. I want the text: "PAUSED --Press O to resume" to stay on the screen for a few seconds after I push X. Or maybe stay there until I press O.  Right now it only displays when I am holding down the X button.  Help please?

Code:

white = Color.new(255,255,255)
yellow = Color.new(255,255,0)
green = Color.new(0,255,0)
counter = Timer.new()
counter:start()
while true do
screen:clear()
pad = Controls.read()
currentTime = counter:time()
screen:print(10,10,"Counter Time: " .. currentTime,white)
if currentTime < 1000 then
screen:print(100,100,"Less than 1000",white)
end
if currentTime > 1000 and currentTime < 2000 then
screen:print(100,100,"Greater than 1000",yellow)
end
if currentTime > 2000 then
counter:reset(0)
counter:start()
end
if pad:cross() then
counter:stop()
screen:print(75,150,"PAUSED --Press O to resume",green)
end
if pad:circle() then
counter:start()
end
        if pad:start() then
            break
            end
screen.waitVblankStart()
screen.flip()
end

------------------------------------------------------------------------------------
     A true master of control is one who never seems to be in control
------------------------------------------------------------------------------------

Offline

 

#2  2008-06-03 23:58:08

Organized_Chaos
PSP Smarty
From: Neosho, MO
Registered: 2008-05-14
Posts: 122
Website

Re: how do i make the text stay on the screen?

Anyone at all? I mean I know this section is dead but still...

Wait.. its not dead, I heard a cricket chirping in the background. lol


------------------------------------------------------------------------------------
     A true master of control is one who never seems to be in control
------------------------------------------------------------------------------------

Offline

 

#3  2008-06-29 20:08:48

Dariusc123456
PSP Member
Registered: 2008-06-09
Posts: 220

Re: how do i make the text stay on the screen?

add this at the end of your code. Maybe this will help

Code:

screen.flip()
while true do
screen.waitVblankStart()
end

Leaving the screen.flip() on the outside of the "while" cmd.

Hope this help, if you didnt get it.


Have you ever want to use your computer away from your home? Do you wish you can have your desktop/laptop at the palm of your hand.

Comming soon within 2008, homebrew program call "NetPlay" which will allow you to use your computer where ever you go. Ether through Adhoc or Wifi, it can be done. All you need is a router, for wifi, or a wifi card/adapter for adhoc. Goto http://www.psp-hacks.com/forums/viewtopic.php?id=146907 and learn more.

Offline

 

#4  2008-08-22 22:58:38

lua scripter
PSP Newbie
Registered: 2008-08-22
Posts: 14
Website

Re: how do i make the text stay on the screen?

your code should be this

Code:

white = Color.new(255,255,255)
yellow = Color.new(255,255,0)
green = Color.new(0,255,0)
counter = Timer.new()
counter:start()
while true do
screen:clear()
screen.flip()
pad = Controls.read()
currentTime = counter:time()
screen:print(10,10,"Counter Time: " .. currentTime,white)
if currentTime < 1000 then
screen:print(100,100,"Less than 1000",white)
end
if currentTime > 1000 and currentTime < 2000 then
screen:print(100,100,"Greater than 1000",yellow)
end
if currentTime > 2000 then
counter:reset(0)
counter:start()
end
if pad:cross() then
counter:stop()
screen:print(75,150,"PAUSED --Press O to resume",green)
end
if pad:circle() then
counter:start()
end
        if pad:start() then
            break
            end
screen.waitVblankStart()
screen.flip()
end

screen:clear() and screen.flip() need to be in the loop


http://i279.photobucket.com/albums/kk131/pspmodders/13536.png

Email me your lua scripts ill fix them or help you fix them and Email you back on what you wanted big_smile

Offline

 
Home | PSP News | PSP Hacks | PSP Saves | PSP Downloads | PSP Backgrounds | PSP Hacks Live Chat | Free PSP | Contact Us



Board footer

Powered by PunBB
© Copyright 2002–2008 PunBB