u mean eboot.pbp in game% ? PSPBrew is best imo ;)
look in http://dl.qj.net for it :tup:
Printable View
u mean eboot.pbp in game% ? PSPBrew is best imo ;)
look in http://dl.qj.net for it :tup:
ok what do i do?...just change the pic?
yes..and remove at3 coz its GTA theme
ok...and on the other one...can I have more then one lua file?Zitat:
Zitat von myschoo
yes...only the 1st one must be named script.lua ...thats the starting one...
u can have as many u want to ;)
ok cool, so instead of index you put scriptZitat:
Zitat von myschoo
Oh and i was wandering when my game go's to beta stage will you beta test it?
yes script.lua
no problem :) :tup:
pls can u tell me how do u change ur "mood" sign under ur name? :)
yea go to editoptions...and change it theirZitat:
Zitat von myschoo
it works! thx thx :)
no problemZitat:
Zitat von myschoo
when i change the variable currentarea should i assign the picture variables used in the previous area to "nil" to save ram space or is it fine???
i think if u use dofile they will still stay in RAM
Im trying not to use dofiles right now both my areas are in 1 file index.lua but I see a lot of posts about people saying the psp crashed because of the ram overload on picture files so i was wondering if i need to assign them to nil or not or if that will even do anything.
???
its fine. just do
if currentarea = something then
blit this image
if not then
blit this one
the psp shouldnt get an overload from that..i do it all the time
Zitat:
Zitat von GuitarGod1134
it depends. is your player allowed to back to that area? if its gone forever, then just make it nil, otherwise keep it.
ok thanks alright well i made this little app while i was waiting for some responses and im getting an error something at like 49 with is the eof but idk whats wrong.
edit : lol nvm i never put while true do lol.
I'm having trouble with exiting my menu.
It waits about 10 seconds and shuts completely off. So it won't go to the XMB like it's supposed to.Code:black = Color.new(0,0,0)
red = Color.new(255,0,0)
white = Color.new(255,255,255)
menustatus = 1
stickmenu = Image.load("stickmenu.png")
oldpad = Controls.read()
while true do
pad = Controls.read()
screen:clear(white)
screen:blit(0,0,stickmenu)
screen:print(180,170,"Single Player",black)
screen:print(180,180,"Multiplayer",black)
screen:print(180,190,"Controls",black)
screen:print(180,200,"Exit",black)
if menustatus == 1 then
screen:print(180,170,"Single Player",red)
end
if menustatus == 2 then
screen:print(180,180,"Multiplayer",red)
end
if menustatus == 3 then
screen:print(180,190,"Controls",red)
end
if menustatus == 4 then
screen:print(180,200,"Exit",red)
end
if pad:down() and oldpad:down() ~= pad:down() then
menustatus = menustatus + 1
end
if pad:up() and oldpad:up() ~= pad:up() then
menustatus = menustatus - 1
end
if menustatus == 0 then
menustatus = 4
end
if menustatus == 5 then
menustatus = 1
end
if pad:cross() and menustatus == 1 then
--code--
end
if pad:cross() and menustatus == 2 then
--code--
end
if pad:cross() and menustatus == 3 then
--code--
end
if pad:cross() and menustatus == 4 then
os.exit()
end
screen.waitVblankStart()
screen.flip()
oldpad = pad
end
whats wrong with home? if u want to go to the xmb?
i just have a quick question so here it is:
??Why is it when i look at my picture using luaplayer for windows, it flickers??
something to do with the loop repeating i guess.
is there any way i can fix it?
Because no one likes the home button. Now can someone help...Zitat:
Zitat von GuitarGod1134
if pad:cross() then os.exit() end
Doesn't that work?
No... I said it freezes and shuts off completely in 10 seconds.
Get the custom luaplayer by cools and use System.quit()
cant find it. can i get a link?
Just search for it, its a couple pages back here in the psp development forum.
oh i thought it was on dl.qj.net
-= Double Post =-
search isn't picking it up.
-= Double Post =-
Now i wanna know how to keep my controls menu on the screen when i press X so I don't have to hold X down. So I go to controls on the main menu. I press X and I want it to keep the controls menu up. What it does now is make me hold down the button for it to stay up.
And the dofile("controls.lua") isCode:black = Color.new(0,0,0)
red = Color.new(255,0,0)
white = Color.new(255,255,255)
menustatus = 1
stickmenu = Image.load("backgrounds/stickmenu.png")
controlsmenu = Image.load("backgrounds/controlsmenu.png")
oldpad = Controls.read()
while true do
pad = Controls.read()
screen:clear(white)
screen:blit(0,0,stickmenu)
screen:print(180,170,"Single Player",black)
screen:print(180,180,"Multiplayer",black)
screen:print(180,190,"Controls",black)
if menustatus == 1 then
screen:print(180,170,"Single Player",red)
end
if menustatus == 2 then
screen:print(180,180,"Multiplayer",red)
end
if menustatus == 3 then
screen:print(180,190,"Controls",red)
end
if pad:down() and oldpad:down() ~= pad:down() then
menustatus = menustatus + 1
end
if pad:up() and oldpad:up() ~= pad:up() then
menustatus = menustatus - 1
end
if menustatus == 0 then
menustatus = 3
end
if menustatus == 4 then
menustatus = 1
end
if pad:cross() and menustatus == 1 then
dofile("singleplayer.lua")
end
if pad:cross() and menustatus == 2 then
dofile("multiplayer.lua")
end
if pad:cross() and menustatus == 3 then
dofile("controls.lua")
end
if pad:l() and pad:r() then
System.usbDiskModeActivate()
end
screen.waitVblankStart()
screen.flip()
oldpad = pad
end
without the quotes of course.Code:screen:clear(white)
screen:blit(0,0,controlsmenu)
Code:black = Color.new(0,0,0)
red = Color.new(255,0,0)
white = Color.new(255,255,255)
menustatus = 1
blitcm = false
stickmenu = Image.load("backgrounds/stickmenu.png")
controlsmenu = Image.load("backgrounds/controlsmenu.png")
oldpad = Controls.read()
while true do
pad = Controls.read()
screen:clear(white)
screen:blit(0,0,stickmenu)
screen:print(180,170,"Single Player",black)
screen:print(180,180,"Multiplayer",black)
screen:print(180,190,"Controls",black)
if menustatus == 1 then
screen:print(180,170,"Single Player",red)
end
if menustatus == 2 then
screen:print(180,180,"Multiplayer",red)
end
if menustatus == 3 then
screen:print(180,190,"Controls",red)
end
if pad:down() and oldpad:down() ~= pad:down() then
menustatus = menustatus + 1
end
if pad:up() and oldpad:up() ~= pad:up() then
menustatus = menustatus - 1
end
if menustatus == 0 then
menustatus = 3
end
if menustatus == 4 then
menustatus = 1
end
if pad:cross() and menustatus == 1 then
dofile("singleplayer.lua")
end
if pad:cross() and menustatus == 2 then
dofile("multiplayer.lua")
end
if pad:cross() and menustatus == 3 then
blitcm = true
end
if pad:l() and pad:r() then
System.usbDiskModeActivate()
end
if blitcm then
screen:blit(0,0,controlsmenu)
end
screen.waitVblankStart()
screen.flip()
oldpad = pad
end
...or the code may be inefficient. wrongly place "screen:clear"s, "screen.waitVblankStart"s , and "screen.flip"s can do that.Zitat:
Zitat von kinghiei
-= Double Post =-
to Cheez Pirate: i think its doing that because the controls.lua file doesnt have a loop. it just does those two lines of code then quits. unless theres more youre not saying.
HEY CHEEZ PIRATE CATCH!!!!!!
http://dl.qj.net/lua-player-v0.20-mo...8717/catid/151
Lol.
edit - nvrmind. :p ...the mistake was embarrassing...lol
Allright EminentJonFrost, seems like errors never end:
Zitat:
Error: index.lua 27: ´then´ expected near ´x64´
um, lol, wheres the script?
Here it is:
Zitat:
white = Color.new(255, 255, 255)
screen:print(136, 136, "Loading LUA Pong...", white)
screen.flip()
background = Image.load("Background.pn g")
bat11 = Image.load("Bat1.png")
bat21 = Image.load("Bat2.png")
bat1 = { x = 20, y = 100 }
bat2 = { x = 460, y = 100 }
ball = { x = 240, y = 146, image = Image.load("Ball.png") }
screen.waitVblankStart(60 )
while true do
screen:clear()
screen:blit(bat1.x, bat1.y, bat11, true)
screen:blit(bat2.x, bat2.y, bat21, true)
pad = Controls.read()
if ball.x == bat.x and ball.y >= bat.y and ball.x < 16x64 then
bounce away
end
if pad:down() then
bat1.y = bat1.y +2
end
if pad:up() then
bat1.y = bat1.y -2
end
if pad:cross() then
bat2.y = bat2.y +2
end
if pad:triangle() then
bat2.y = bat2.y -2
end
if pad:start() then
break
end
screen:print(136, 136, "Welcome to the world of PPP.", white)
screen.waitVblankStart()
screen.flip()
end
Are you trying to say if ball.x is greater then the number that is the answer of 16 multiplied by 64? Because I dont see a variable 16x64 in your code.
So if you would like that to be 16 multiplied by 64 which is pointless I think because you can just use the number 1024. but if thats what you want then this should work.
if ball.x == bat.x and ball.y >= bat.y and ball.x < (16*64) then
but i would just do
if ball.x == bat.x and ball.y >= bat.y and ball.x < 1024 then
not to mention bounce away isnt a valid statement.
also while ur loading ur background there is a space in the suffix it should be Background.png not background.pn g
EminentJonFrost explained that i should write the size of my image there.
And the error with background.pn g thats not me, its a little error in QJ or something, because my script is not like that.
But Am I right u mean 16 multiplied by 64 right?
Yes. Not ment as a variable.
And the "bounce away" that was eminentjonfrost who told me to write that.
i shoulda clarified a bit there...:p sorry
lemme do it in an edit...gimme a sec
EDIT - ok, lets say that your image of the bat is 5x20. so its 4 times as high is it wide. that wont make a pretty paddle for ping pong, but it fits this example.
the coordinates (i use this word alot lately..) for the image, if it were blitted at (10, 10) would be:
10,10-----15, 10
|
10, 30-----15, 30
pretend thats an image. lol
now, the way to make the ball do something when it comes into contact is to make sure the ball cannot enter the image without something happening.
those numbers are from 'image' i made above. look at it until it makes sense.Code:image = { x = 10, x2 = 15, y = 10, y2 = 30 } -- see where i got these numbers from?
so this is the code for the 'if' statement. (the if statement is for this example, you gotta change the numbers to fit your case)
it looks like you're alot newer to this than i thought. you're supposed to put your own code in the if statement so that you get the ball to do what you want, but i dont think you know how to yet...Code:if ball.x < image.x2 and ball.x > image.x and ball.y < image.y2 and ball.y > image.y then
bounce away or do something
end