![]() |
| Forums | Gaming News | Videos | Downloads | Today's Posts | Mark Forums Read | Chat | FAQ | Members List | Contact |
| ||||||
This is a discussion on 2 lua questions within the PSP Development Forum forums, part of the PSP Development, Hacks, and Homebrew category; my first lua question is my background pic covers up all my other pics how do i make it to ...
![]() |
|
|
LinkBack | Thread Tools |
|
|
#1 |
![]() ![]() Developer
|
my first lua question is my background pic covers up all my other pics how do i make it to not cover anyother pics
2nd: i have an image that i start out with but wanna change it when i press a button so how do i make it so it makes a new picture at the same location? i will upload my current code at your request
__________________
1. Failed....again... 2. http://slicer.gibbocool.com/ stay updated on all my projects |
|
|
|
|
|
#3 | |
![]() ![]() Developer
|
k 1 sec
p.s. it still is only in lua Quote:
__________________
1. Failed....again... 2. http://slicer.gibbocool.com/ stay updated on all my projects |
|
|
|
|
|
|
#4 |
![]() ![]() 6201ymereJ
|
it looks like u need to clear the screen before u reblit the new image...but, im no genius, there is someone that should know more than me...but thats my assesment of #2, as for number one, i dont even see ur background image code in there. besides when u call it for future reference
|
|
|
|
|
|
#6 |
![]() ![]() Developer
|
i had the code in there earlier but i forgot to put it back in berfore i posted it anyways is there a way to just make the background without an actuall pic i read it somewhere but now i cant find it
__________________
1. Failed....again... 2. http://slicer.gibbocool.com/ stay updated on all my projects |
|
|
|
|
|
#7 |
![]() |
Hey, I just posted soemthing similar for you , but just in case you dotn see it, I'll post again. :icon_wink You have too many blits in there. You should just create a new variable, something like "CurrentBall" and have your script blit its value only once. That way, when you press a button, you only have to change the value of "CurrentBall".... like CurrentBall=redball whatever. Simpler that way.
|
|
|
|
|
|
#8 | |
![]() |
Quote:
Code:
screen:fillRect(0,0,480,272,color)
|
|
|
|
|
|
|
#9 | |
![]() ![]() Developer
|
Quote:
__________________
1. Failed....again... 2. http://slicer.gibbocool.com/ stay updated on all my projects |
|
|
|
|
|
|
#10 |
![]() |
Code:
System.usbDiskModeActivat e()
green=Color.new(0,255,0)
orange=Color.new(255,128, 0)
teal=Color.new(64,128,128 )
blue=Color.new(0,0,255)
red=Color.new(255,0,0)
black=Color.new(0,0,0)
lightgreen=Color.new(0,25 5,128)
lightyellow=Color.new(255 ,255,128)
redballX=200
redballY=150
redballColor=blue
background = Image.load("pic/background.png")
redball = Image.load("pic/redball.png")
redballblue = Image.load("pic/redballblue.png")
redballred = Image.load("pic/redballred.png")
redballorange = Image.load("pic/redballorange.png")
redballgreen = Image.load("pic/redballgreen.png")
redballteal = Image.load("pic/redballteal.png")
redballblack = Image.load("pic/redballblack.png")
redballlightgreen = Image.load("pic/redballlightgreen.png")
redballlightyellow = Image.load("pic/redballlightyellow.png")
--initiate dafault value
CurrentBall=redballred
while true do
screen:clear()
pad=Controls.read()
if pad:cross() then CurrentBall=redballred
elseif pad:triangle() then CurrentBall=redballblue
elseif pad:circle() then CurrentBall=redballlightyellow
elseif pad:square() then CurrentBall=redballorange
elseif pad:start() then CurrentBall=redballgreen
elseif pad:l() then CurrentBall=redballteal
elseif pad:r() then CurrentBall=redballlightgreen
elseif pad:select() then break
end
if pad:up() then redballY=redballY-5
elseif pad:down() then redballY=redballY+5
elseif pad:left() then redballX=redballX-5
elseif pad:right() then redballX=redballX+5
end
--You only blit it once, but you can change its value by pressing buttons
screen:blit(redballX, redballY, CurrentBall)
screen.waitVblankStart()
screen.flip()
end
|
|
|
|
|
|
#11 |
![]() ![]() Developer
|
o, ok i see thanks you guys are very helpful
__________________
1. Failed....again... 2. http://slicer.gibbocool.com/ stay updated on all my projects |
|
|
|
|
|
#12 |
![]() ![]() Developer
|
i wrote that code into mine to make sure it works before i implimate it to my own liking but i keep getting a error:
error:= expected near e u no the rest anyways i have beeen looking though the code but i cant seem to figure out what the error means so could yea help i'm ganna go back though but help would be appreciated. nvm i think i got it
__________________
1. Failed....again... 2. http://slicer.gibbocool.com/ stay updated on all my projects Last edited by slicer4ever; 10-21-2005 at 08:43 PM.. |
|
|
|
|
|
#13 |
![]() |
In the post with the code, it inserts spaces. For example when it says USBDiskActivat e() it should be USBDiskActivate(), with no spaces.
__________________
[url=http://profile.mygamercard.net/b0xx0r][img]http://card.mygamercard.net/gelsig/b0xx0r.png[/img][/url] |
|
|
|
|
|
#14 |
|
ANy particular reason for activating the USB drive??
__________________
Cover your eyes and run... gmansixfo= STEPMANIA LEGEND!!
|
|
|
|
|
|
|
#16 |
|
Oh just checkin sorry!
__________________
Cover your eyes and run... gmansixfo= STEPMANIA LEGEND!!
|
|
|
|
|
![]() |
| Tags |
| lua , questions |
| Thread Tools | |
|
|