Zeige Ergebnis 3.481 bis 3.510 von 10238
Lua Programming Help Thread
This is a discussion on Lua Programming Help Thread within the PSP Development Forum forums, part of the PSP Development, Hacks, and Homebrew category; nvm guys i fugured it out...
-
09-12-2006, 02:07 PM #3481likes kittens....awww....
- Registriert seit
- Sep 2006
- Ort
- Detroit
- Beiträge
- 628
- Points
- 6.975
- Level
- 55
- Downloads
- 0
- Uploads
- 0
nvm guys i fugured it out
-
09-13-2006, 08:15 PM #3482QJ Gamer Blue
- Registriert seit
- Sep 2006
- Ort
- 6ft. Down Underground........Oh and guess what my avatar is
- Beiträge
- 387
- Points
- 4.918
- Level
- 44
- Downloads
- 0
- Uploads
- 0
ok how can i make it were this image gos back and fourth?

I want it inserted in this code were the code still works but I cant figure out were to put it
Code:grass = Image.load("grass.png") player = Image.load("player.png") flower = Image.load("flower.png") start = Image. load("start.png") white = Color.new(255,255,255) counter = Timer.new() screenwidth = 480 - player:width() screenheight = 272 - player:width() Player = { } Player[1] = { x = 200, y = 50 } while true do pad = Controls.read() screen:clear() counter:start() screen:clear() currentTime = counter:time() if currentTime < 1000 then screen:print(100,100,"Loading",white) end if currentTime > 1000 then screen:print(100,100,"Loading",white) end if currentTime > 2000 then screen:print(100,100,"Loading.",white) end if currentTime > 3000 then screen:print(100,100,"Loading..",white) end if currentTime > 4000 then screen:print(100,100,"Loading...",white) end if currentTime > 5000 then screen:print(100,100,"Loading....",white) end if currentTime > 6000 then screen:print(100,100,"Loading....Almost done",white) end if currentTime > 7000 then screen:print(100,100,"Loading....Almost done.",white) end if currentTime > 8000 then screen:print(100,100,"Loading....Almost done..",white) end if currentTime > 9000 then screen:print(100,100,"Loading....Almost done...",white) end if currentTime > 10000 then screen:print(100,100,"Loading....Almost done...f",white) end if currentTime > 10100 then screen:print(100,100,"Loading....Almost done...fi",white) end if currentTime > 10200 then screen:print(100,100,"Loading....Almost done...fin",white) end if currentTime > 10300 then screen:print(100,100,"Loading....Almost done...fina",white) end if currentTime > 10400 then screen:print(100,100,"Loading....Almost done...final",white) end if currentTime > 10500 then screen:print(100,100,"Loading....Almost done...finaly",white) end if currentTime > 10600 then screen:print(100,100,"Loading....Almost done...finaly d",white) end if currentTime > 10700 then screen:print(100,100,"Loading....Almost done...finaly do",white) end if currentTime > 10800 then screen:print(100,100,"Loading....Almost done...finaly don",white) end if currentTime > 10900 then screen:print(100,100,"Loading....Almost done...finaly done",white) end if currentTime > 12000 then screen:print(150,110,"Get to the finish line",white) end if currentTime > 12100 then screen:print(150,120,"Lvl. 1",white) end if currentTime > 20000 then counter:stop() end --Were grass goes(top) screen:blit(0,0,grass) screen:blit(32,0,grass) screen:blit(64,0,grass) screen:blit(96,0,grass) screen:blit(128,0,grass) screen:blit(160,0,grass) screen:blit(192,0,grass) screen:blit(224,0,grass) screen:blit(256,0,grass) screen:blit(288,0,grass) screen:blit(320,0,grass) screen:blit(352,0,grass) screen:blit(384,0,grass) screen:blit(416,0,grass) screen:blit(448,0,grass) --More grass(right under top) screen:blit(0,32,grass) screen:blit(32,32,grass) screen:blit(64,32,grass) screen:blit(96,32,grass) screen:blit(128,32,grass) screen:blit(160,32,grass) screen:blit(192,32,grass) screen:blit(224,32,grass) screen:blit(256,32,grass) screen:blit(288,32,grass) screen:blit(320,32,grass) screen:blit(352,32,grass) screen:blit(384,32,grass) screen:blit(416,32,grass) screen:blit(448,32,grass) --More grass(third row) screen:blit(0,64,grass) screen:blit(32,64,grass) screen:blit(64,64,grass) screen:blit(96,64,grass) screen:blit(128,64,grass) screen:blit(160,64,grass) screen:blit(192,64,grass) screen:blit(224,64,grass) screen:blit(256,64,grass) screen:blit(288,64,grass) screen:blit(320,64,grass) screen:blit(352,64,grass) screen:blit(384,64,grass) screen:blit(416,64,grass) screen:blit(448,64,grass) --forth row screen:blit(0,96,grass) screen:blit(32,96,grass) screen:blit(64,96,grass) screen:blit(386,96,grass) screen:blit(416,96,grass) screen:blit(448,96,grass) --fith row screen:blit(0,128,grass) screen:blit(32,128,grass) screen:blit(64,128,grass) screen:blit(96,128,grass) screen:blit(128,128,grass) screen:blit(160,128,grass) screen:blit(192,128,grass) screen:blit(224,128,grass) screen:blit(256,128,grass) screen:blit(288,128,grass) screen:blit(320,128,grass) screen:blit(352,128,grass) screen:blit(384,128,grass) screen:blit(416,128,grass) screen:blit(448,128,grass) --Sixth row screen:blit(0,160,grass) screen:blit(32,160,grass) screen:blit(64,160,grass) screen:blit(96,160,grass) screen:blit(128,160,grass) screen:blit(160,160,grass) screen:blit(192,160,grass) screen:blit(224,160,grass) screen:blit(256,160,grass) screen:blit(288,160,grass) screen:blit(320,160,grass) screen:blit(352,160,grass) screen:blit(384,160,grass) screen:blit(416,160,grass) screen:blit(448,160,grass) --Seventh Row screen:blit(0,192,grass) screen:blit(32,192,grass) screen:blit(64,192,grass) screen:blit(96,192,grass) screen:blit(128,192,grass) screen:blit(160,192,grass) screen:blit(192,192,grass) screen:blit(224,192,grass) screen:blit(256,192,grass) screen:blit(288,192,grass) screen:blit(320,192,grass) screen:blit(352,192,grass) screen:blit(384,192,grass) screen:blit(416,192,grass) screen:blit(448,192,grass) --eighth row screen:blit(0,224,grass) screen:blit(32,224,grass) screen:blit(64,224,grass) screen:blit(96,224,grass) screen:blit(128,224,grass) screen:blit(160,224,grass) screen:blit(192,224,grass) screen:blit(224,224,grass) screen:blit(256,224,grass) screen:blit(288,224,grass) screen:blit(320,224,grass) screen:blit(352,224,grass) screen:blit(384,224,grass) screen:blit(416,224,grass) screen:blit(448,224,grass) --ninth Row screen:blit(0,256,grass) screen:blit(32,256,grass) screen:blit(64,256,grass) screen:blit(96,256,grass) screen:blit(128,256,grass) screen:blit(160,256,grass) screen:blit(192,256,grass) screen:blit(224,256,grass) screen:blit(256,256,grass) screen:blit(288,256,grass) screen:blit(320,256,grass) screen:blit(352,256,grass) screen:blit(384,256,grass) screen:blit(416,256,grass) screen:blit(448,256,grass) --Start screen:blit(195,45,start) --Flower paths(around start image) screen:blit(230,25,flower) screen:blit(220,25,flower) screen:blit(210,25,flower) screen:blit(200,25,flower) screen:blit(190,25,flower) screen:blit(180,25,flower) screen:blit(170,25,flower) screen:blit(170,30,flower) screen:blit(170,42,flower) screen:blit(170,50,flower) screen:blit(170,60,flower) screen:blit(170,70,flower) screen:blit(180,70,flower) screen:blit(190,70,flower) screen:blit(200,70,flower) screen:blit(210,70,flower) screen:blit(220,70,flower) screen:blit(230,70,flower) screen:blit(300,220,flower) screen:blit(Player[1].x,Player[1].y,player) if pad:left() and Player[1].x > 0 then Player[1].x = Player[1].x - 2 end if pad:right() and Player[1].x < screenwidth then Player[1].x = Player[1].x + 2 end if pad:up() and Player[1].y > 0 then Player[1].y = Player[1].y - 2 end if pad:down() and Player[1].y < screenheight then Player[1].y = Player[1].y + 2 end screen.waitVblankStart() screen.flip() end
-
09-14-2006, 11:48 AM #3483QJ Gamer Blue
- Registriert seit
- Jul 2006
- Ort
- Alabama
- Beiträge
- 142
- Points
- 4.241
- Level
- 41
- Downloads
- 0
- Uploads
- 0
I don't know what you're asking for. If it's AI or animation, specify which and I (or someone else) can help, but for now your code is way too inefficient.
Read this before you continue:
http://evilmana.com/tutorials/lua_tutorial_07.php
What you're looking for there is:
If you don't understand, there's an explanation in the tutorial.Code:for a = 0, 14 do for b = 0,8 do screen:blit(32 * a, 32 * b, grass) end end
Also, 'finaly' is spelled with two Ls.
-
09-14-2006, 04:32 PM #3484QJ Gamer Blue
- Registriert seit
- Sep 2006
- Ort
- 6ft. Down Underground........Oh and guess what my avatar is
- Beiträge
- 387
- Points
- 4.918
- Level
- 44
- Downloads
- 0
- Uploads
- 0
Yes i know that code, but i dont use it because it blits over the text.
Zitat von Aphonia
and its animation...i have a code right their i just dont know were to put it
-= Double Post =-
and i will fix the finally lolGeändert von the undead (09-14-2006 um 04:32 PM Uhr) Grund: Automerged Doublepost
-
09-14-2006, 04:38 PM #3485I'm Baaaack!

- Registriert seit
- May 2006
- Ort
- Nowhere
- Beiträge
- 2.186
- Points
- 17.067
- Level
- 83
- Downloads
- 0
- Uploads
- 0
The undead, you have A LOT of unneeded code. Read this tutorial. It will help you slim all image code down to 5 or 6 lines.

-
09-14-2006, 04:49 PM #3486Your Fate is Grim...

- Registriert seit
- Oct 2005
- Beiträge
- 2.269
- Points
- 11.640
- Level
- 70
- Downloads
- 0
- Uploads
- 0
Zitat von the undead
then all you do, is FISRT blit all the grass stuff, THEN print your text. itll show.--------------------------------------------------------------------------------------
-
09-14-2006, 04:59 PM #3487QJ Gamer Blue
- Registriert seit
- Sep 2006
- Ort
- 6ft. Down Underground........Oh and guess what my avatar is
- Beiträge
- 387
- Points
- 4.918
- Level
- 44
- Downloads
- 0
- Uploads
- 0
I already tried that, but I will try again
Zitat von Grimfate126
-
09-15-2006, 10:52 AM #3488QJ Gamer Green
- Registriert seit
- Jan 2006
- Ort
- Lost in the woods..
- Beiträge
- 804
- Points
- 6.398
- Level
- 52
- Downloads
- 0
- Uploads
- 0
Offtopic :
I am not coding or anything, I'm just trying to find some info about a lua game. So excuse my noob questions. Its been a couple of days now but i didn't get any ideas.
So if some lua coders have some spare time please have a look at the thread i started in psp general and give me a more professional opinion about it.
It would be highly appreciated!
The thread with pics and the game is here[FONT=garamond][size=3]Edison Carter Rulez![/size][/FONT]
[b][u]There are 2 categories of n00bs :[/u]
The ones that start as n00bs and advance.
And the ones that get born as n00bs and remain.[/b]
-
09-15-2006, 06:57 PM #3489QJ Gamer Blue
- Registriert seit
- Sep 2006
- Ort
- 6ft. Down Underground........Oh and guess what my avatar is
- Beiträge
- 387
- Points
- 4.918
- Level
- 44
- Downloads
- 0
- Uploads
- 0
Ok im trying to put this code in
But it says error:a.lua:3:'=' expected near fontCode:Font Font.load(btseps2.ttf)
so i put this in instead
but now I get this error:a.lua:3: attempt to index global 'font' a nil valueCode:Font = Font.load(btseps2.ttf)
What is wrong?
-
09-15-2006, 07:17 PM #3490sceKernelExitGame();
- Registriert seit
- Jan 2006
- Ort
- New York
- Beiträge
- 3.126
- Points
- 19.955
- Level
- 89
- Downloads
- 0
- Uploads
- 0
is you path to the font correct? and are you declaring it before you use it?
-
09-15-2006, 07:18 PM #3491QJ Gamer Blue
- Registriert seit
- Sep 2006
- Ort
- 6ft. Down Underground........Oh and guess what my avatar is
- Beiträge
- 387
- Points
- 4.918
- Level
- 44
- Downloads
- 0
- Uploads
- 0
yes the path to the file is right(its in the same folder)
Zitat von Bronx
and what do you mean declaring it?
right now im just loading it
-
09-15-2006, 07:24 PM #3492QJ Gamer Silver

- Registriert seit
- Jun 2006
- Ort
- UK
- Beiträge
- 2.326
- Points
- 10.263
- Level
- 67
- Downloads
- 0
- Uploads
- 0
Code:ANewFont = Font.load("btseps2.ttf")
-
09-15-2006, 07:28 PM #3493QJ Gamer Blue
- Registriert seit
- Sep 2006
- Ort
- 6ft. Down Underground........Oh and guess what my avatar is
- Beiträge
- 387
- Points
- 4.918
- Level
- 44
- Downloads
- 0
- Uploads
- 0
Ok thanks, ill try that
Zitat von head_54us
-= Double Post =-
I still get the nil value errorGeändert von the undead (09-15-2006 um 07:28 PM Uhr) Grund: Automerged Doublepost
-
09-15-2006, 07:30 PM #3494QJ Gamer Silver

- Registriert seit
- Jun 2006
- Ort
- UK
- Beiträge
- 2.326
- Points
- 10.263
- Level
- 67
- Downloads
- 0
- Uploads
- 0
Are you using the latest LuaPlayer?
-
09-15-2006, 07:32 PM #3495QJ Gamer Blue
- Registriert seit
- Sep 2006
- Ort
- 6ft. Down Underground........Oh and guess what my avatar is
- Beiträge
- 387
- Points
- 4.918
- Level
- 44
- Downloads
- 0
- Uploads
- 0
yes I am
Zitat von head_54us
-
09-15-2006, 07:35 PM #3496QJ Gamer Silver

- Registriert seit
- Jun 2006
- Ort
- UK
- Beiträge
- 2.326
- Points
- 10.263
- Level
- 67
- Downloads
- 0
- Uploads
- 0
Show the line of code you are using now to check if you got the syntax correct.
-
09-15-2006, 07:43 PM #3497QJ Gamer Blue
- Registriert seit
- Sep 2006
- Ort
- 6ft. Down Underground........Oh and guess what my avatar is
- Beiträge
- 387
- Points
- 4.918
- Level
- 44
- Downloads
- 0
- Uploads
- 0
Im starting a program, but i need to test this font
Zitat von head_54us
Code:red = Color.new(255, 0, 0) ANewFont = Font.load("btseps2.ttf") screen:print(200, 100, "Font test", ANewFont) screen.flip() while true do screen.waitVblankStart() end
-
09-15-2006, 07:50 PM #3498QJ Gamer Silver

- Registriert seit
- Jun 2006
- Ort
- UK
- Beiträge
- 2.326
- Points
- 10.263
- Level
- 67
- Downloads
- 0
- Uploads
- 0
What Line do you get the error on?
sidenote: You are not meant to use screen
rint with fonts, ou would want screen:fontprint(ANewFont , 200, 100, "Font test")
-
09-15-2006, 07:55 PM #3499QJ Gamer Blue
- Registriert seit
- Sep 2006
- Ort
- 6ft. Down Underground........Oh and guess what my avatar is
- Beiträge
- 387
- Points
- 4.918
- Level
- 44
- Downloads
- 0
- Uploads
- 0
ahh i see, ididnt know that...um line 3...let me try that
Zitat von head_54us
-= Double Post =-
I used that, i still get that nil value error...line 3Geändert von the undead (09-15-2006 um 07:55 PM Uhr) Grund: Automerged Doublepost
-
09-20-2006, 12:46 AM #3500Ponies and Unicorns
- Registriert seit
- Aug 2006
- Ort
- Pelennor Fields
- Beiträge
- 547
- Points
- 5.778
- Level
- 49
- Downloads
- 0
- Uploads
- 0
Lua help. cant find the lua help thread if a mod could move this thanks
-- maze of doom
menu = Image.load("menu.jpeg")
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)
oldpad = Controls.read()
while true do
pad = Controls.read()
screen:blit(0,0,menu)
screen.print (10, 100, "Press X to Start" green)
screen.print (20, 150, "Maze of Doom created by: GuitarGod1124 also known as GuitarGod1134" orange)
screen:clear()
if pad:cross()then
screen.print (10, 100, "Coming Soon...." orange)
end
screen.flip()
screen.waitVblankStart()
oldpad = pad
end
okay everytime I try to start this it gives me an error saying
Error: SCRIPT.LUA:13: ')' expected near 'green'
Press start to restart
can someone help? At first i thought i didnt flip it on to the on screen buffer but i did. didnt i?If you play WoW come find me on DOOMHAMMER (US) I am Human mage lvl 64 Atrana is the name (dont ask for runs!)
Gold donations are highly appreciated!
-
09-20-2006, 12:54 AM #3501QJ Is Cluttered.
- Registriert seit
- Jun 2005
- Ort
- New Zealand.
- Beiträge
- 6
- Points
- 26.159
- Level
- 96
- Downloads
- 0
- Uploads
- 0
Should work, there were a few errors in there, like not putting a comma after some of your arguments, and not defining the color green, but I fixed it up.Code:menu = Image.load("menu.jpeg") 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) oldpad = Controls.read() while true do pad = Controls.read() screen:blit(0,0,menu) screen.print (10, 100, "Press X to Start", green) screen.print (20, 150, "Maze of Doom created by: GuitarGod1124 also known as GuitarGod1134", orange) screen:clear() if pad:cross()then screen.print (10, 100, "Coming Soon....", orange) end screen.flip() screen.waitVblankStart() oldpad = pad end
-
09-20-2006, 01:45 AM #3502QJ Gamer Bronze
- Registriert seit
- Feb 2006
- Ort
- Earth, UK
- Beiträge
- 457
- Points
- 5.924
- Level
- 49
- Downloads
- 0
- Uploads
- 0
Same as Macca's, except for the screen:clear() needs to be before you screen:blit or screenCode:menu = Image.load("menu.jpeg") 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) oldpad = Controls.read() while true do pad = Controls.read() screen:clear() screen:blit(0,0,menu) screen:print (10, 100, "Press X to Start", green) screen:print (20, 150, "Maze of Doom created by: GuitarGod1124 also known as GuitarGod1134", orange) if pad:cross()then screen:print (10, 100, "Coming Soon....", orange) end screen.flip() screen.waitVblankStart() oldpad = pad end
rint else you'll clear the screen as soon as they are put on.
And Im fairly sure isnotCode:screen:blit and screen:print
.Code:screen.print and screen.blit
Correct me if im wrong<<Put A message Here>>
<<Just made another rubbish website visit it here.>>
-
09-20-2006, 02:30 AM #3503Ponies and Unicorns
- Registriert seit
- Aug 2006
- Ort
- Pelennor Fields
- Beiträge
- 547
- Points
- 5.778
- Level
- 49
- Downloads
- 0
- Uploads
- 0
okay thanks guys
-= Double Post =-
O WOW i had no idea i didnt define green. missed that lol.
im getting a image loading error. where do i put my menu.jpeg?Geändert von GuitarGod1134 (09-20-2006 um 02:35 AM Uhr) Grund: Automerged Doublepost
If you play WoW come find me on DOOMHAMMER (US) I am Human mage lvl 64 Atrana is the name (dont ask for runs!)
Gold donations are highly appreciated!
-
09-20-2006, 04:23 AM #3504QJ Gamer Bronze
- Registriert seit
- Feb 2006
- Ort
- Earth, UK
- Beiträge
- 457
- Points
- 5.924
- Level
- 49
- Downloads
- 0
- Uploads
- 0
in the same folder as the index.lua. If you put in in another folder then you would have to change
Code:menu = Image.load("menu.jpeg") to menu = Image.load("foldername/menu.jpeg")<<Put A message Here>>
<<Just made another rubbish website visit it here.>>
-
09-20-2006, 04:43 AM #3505Ponies and Unicorns
- Registriert seit
- Aug 2006
- Ort
- Pelennor Fields
- Beiträge
- 547
- Points
- 5.778
- Level
- 49
- Downloads
- 0
- Uploads
- 0
okay thanks
If you play WoW come find me on DOOMHAMMER (US) I am Human mage lvl 64 Atrana is the name (dont ask for runs!)
Gold donations are highly appreciated!
-
09-20-2006, 12:33 PM #3506QJ Gamer Green
- Registriert seit
- Oct 2005
- Beiträge
- 543
- Points
- 6.721
- Level
- 53
- Downloads
- 0
- Uploads
- 0
There is a link in the stickys
HELP ME HAIRY LEG!!!!
I have a 1.5 (downgraded) US PSP
[code]
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _
/ \ / \ / \ / \ / \ / \ / \ / \ / \ / \ / \ / \ / \ / \ / \
( P | S | P | - | P | r | o | g | r | a | m | m | i | n | g )
\_/ \_/ \_/ \_/ \_/ \_/ \_/ \_/ \_/ \_/ \_/ \_/ \_/ \_/ \_/
_ _ _ _ _
/ \ / \ / \ / \ / \
( A | d | m | i | n )
\_/ \_/ \_/ \_/ \_/ [/code]
-
09-21-2006, 01:22 PM #3507likes kittens....awww....
- Registriert seit
- Sep 2006
- Ort
- Detroit
- Beiträge
- 628
- Points
- 6.975
- Level
- 55
- Downloads
- 0
- Uploads
- 0
i am having a problem loading this for some reason..
Code:bg = Image.load("background.png") red = Color.new(255,0,0) green = Color.new(0,255,0) white = Color.new(255,255,255) oldpad = Controls.read() font = Font.load("visitor.ttf") font:setPixelSizes(0, 32) RN0 = math.random(1,3) RN1 = math.random(1,3) RN2 = math.random(1,3) while true do pad = Controls.read() if pad:square() then RN0 = math.random(1,3) end if pad:square() then RN1 = math.random(1,3) end if pad:square() then RN2 = math.random(1,3) end screen:fontPrint(font, 165,150, RN0, red) screen:fontPrint(font, 195,150, RN1, red) screen:fontPrint(font, 220,150, RN2, red) elseif (math.random(1,3) > 1) then screen:blit(0,0, bg) screen:fontPrint(font, 10,150, "YOU WON THE JACKPOT!!", green) end elseif (math.random(1,3) > 2) then screen:blit(0,0, bg) screen:fontPrint(font, 10,150, "YOU WON THE JACKPOT!!", green) end elseif (math.random(1,3) > 3) then screen:blit(0,0, bg) screen:fontPrint(font, 10,150, "YOU WON THE JACKPOT!!", green) end screen.flip() screen.waitVblankStart() oldpad = pad endGeändert von psphacker12. (09-21-2006 um 01:45 PM Uhr)
-
09-21-2006, 01:37 PM #3508sceKernelExitGame();
- Registriert seit
- Jan 2006
- Ort
- New York
- Beiträge
- 3.126
- Points
- 19.955
- Level
- 89
- Downloads
- 0
- Uploads
- 0
well you have no screen:clear()
-
09-21-2006, 02:44 PM #3509
you cant just use elseif. You have to use it like this:
if bla==bla2 then
something
elseif bla~=bla2 then
somethingelse
end
also
can be:Code:if pad:square() then RN0 = math.random(1,3) end if pad:square() then RN1 = math.random(1,3) end if pad:square() then RN2 = math.random(1,3) end
Another thing, put this in the main loop once and in the beginning:Code:if pad:square() then RN0 = math.random(1,3) RN1 = math.random(1,3) RN2 = math.random(1,3) end
And yeah, you should have "screen:clear()" in your main loop. In the beginning and before the "screen:blit(0,0, bg)".Code:screen:blit(0,0, bg)
LUA manual:
[url]http://www.lua.org/manual/5.0/manual.html[/url]
LUA Wiki:
[url]http://wiki.ps2dev.org/psp:lua_player[/url]
-
09-22-2006, 11:32 AM #3510likes kittens....awww....
- Registriert seit
- Sep 2006
- Ort
- Detroit
- Beiträge
- 628
- Points
- 6.975
- Level
- 55
- Downloads
- 0
- Uploads
- 0
help
idk it says you won the jackpot automatically when i start the game.. heres the code,
-= Double Post =-Code:System.usbDiskModeActivate() red = Color.new(255,0,0) green = Color.new(0,255,0) white = Color.new(255,255,255) oldpad = Controls.read() font = Font.load("visitor.ttf") font:setPixelSizes(0, 32) screen:clear() math.randomseed(os.time()) RN0 = math.random(1,3) RN1 = math.random(1,3) RN2 = math.random(1,3) RN9 = complete bg = Image.load("background.png") while true do pad = Controls.read() if pad:square() then RN0 = math.random(1,3) RN1 = math.random(1,3) RN2 = math.random(1,3) end screen:fontPrint(font, 165,150, RN0, red) screen:fontPrint(font, 195,150, RN1, red) screen:fontPrint(font, 220,150, RN2, red) if RN0 == 1 and RN9 == complete then RN9 = one end if RN1 == 1 and RN9 == one then RN9 = two end if RN2 == 1 and RN9 == two then RN9 = three end if RN9 == three then RN9 = complete screen:clear() screen:blit(0,0, bg) screen:fontPrint(font, 10,150, "YOU WON THE JACKPOT!!", green) end screen.flip() screen.waitVblankStart() end
bump!!!!!!!!!!!!!!!!!!!!! !!!!!Geändert von psphacker12. (09-22-2006 um 11:32 AM Uhr) Grund: Automerged Doublepost


LinkBack URL
About LinkBacks
Mit Zitat antworten

Hello everyone I am new here and I am glad to be part of this amazing community and I think there...
New to forum