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; Wow. I messed up something. If all of the Enemies' states are equal to "dead", then I want it to ...
-
08-27-2006, 04:54 PM #3391QJ Gamer Bronze
- Registriert seit
- Jul 2005
- Ort
- USA
- Beiträge
- 496
- Points
- 14.090
- Level
- 77
- Downloads
- 0
- Uploads
- 0
Wow. I messed up something. If all of the Enemies' states are equal to "dead", then I want it to print a message. How would I go about doing that. Look above for messed up code.
-
08-27-2006, 05:11 PM #3392words are stones in my <3

- Registriert seit
- Jul 2005
- Ort
- Spokane
- Beiträge
- 5.008
- Points
- 35.274
- Level
- 100
- My Mood
-
- Downloads
- 1
- Uploads
- 0
Please... Before making a game, understand the concept of programming and the routines used to do what you want.
This is the most efficient way I see fit.Code:zombies_dead = 0 for i=0,6 do if Enemy[i].state == "dead" then zombies_dead = zombies_dead + 1 end end ... if zombies_dead == 6 then screen:print(0,0,"Zombies all dead...",color) end
...at what speed must I live.. to be able to see you again?...
Projects
You can support my Open World 3D RPG for PSP by voting for it here
-
08-27-2006, 05:11 PM #3393Developer

- Registriert seit
- Jun 2006
- Ort
- USA, Virginia
- Beiträge
- 580
- Points
- 5.650
- Level
- 48
- Downloads
- 0
- Uploads
- 0
I'm having a bit of a problem adding a start menu to a game that im helping to make. i get this error.
error: game.lua;246: attempt to compare nil with a number
Error: No script file found.
Any help would be great.
Code:--Conker Mini --Aug 26, 2006 black = Color.new(0, 0, 0) white = Color.new(255,255,255) green = Color.new(0,255,0) red = Color.new(255,0,0) textcolor = Color.new(0, 0, 0) selecolor = Color.new(255, 255, 255) editcolor = Color.new(0, 0, 0) cursorcolor = Color.new(255, 250, 250) scene = {} healthbar = {} healthbar.y = 10 background = Image.load("images/background.png") background2 = Image.load("images/background.png") start = Image.load("images/start.png") conkerPoint = 0 Player1 = Image.load("images/conker/right/conker1.png") Player2 = Image.load("images/conker/right/conker2.png") Player3 = Image.load("images/conker/right/conker3.png") Player1L = Image.load("images/conker/left/conker1.png") Player2L = Image.load("images/conker/left/conker2.png") Player3L = Image.load("images/conker/left/conker3.png") Player = {} Player.image = Player1 Playera = Image.load("images/conker/right/conkera.png") Playera2 = Image.load("images/conker/left/conkera2.png") Playerj = Image.load("images/conker/right/conkerj.png") Playerj2 = Image.load("images/conker/left/conkerj2.png") Playerp = {} Playerc = {} Player.y = 200 Player.x = 0 Player.lives = 4 Player.health = 200 Player.gravity = 200 Player.jumpspeed = 10 Player.jumpstate = "ground" playerHeight = 66 playerWidth = 55 x = 0 counter = Timer.new() counter:start() oldTime = counter:time() Timer = 0 pad = Controls.read function moveRight() Timer = Timer + 1 if Timer>= 25 or Timer<=0 then Timer = 0 end if Timer==5 then Player.image = Player1 end if Timer==10 then Player.image = Player2 end if Timer==15 then Player.image = Player3 end end function moveLeft() Timer = Timer + 1 if Timer>= 25 or Timer<=0 then Timer = 0 end if Timer==5 then Player.image = Player1L end if Timer==10 then Player.image = Player2L end if Timer==15 then Player.image = Player3L end end --Conker Music --Aug 26, 2006 Music.playFile("music/windy.it", false) while true do pad = Controls.read() --print background --Aug 22, 2006 screen:clear() screen:blit(0,0,background) --print Conker --Aug 23, 2006 screen:blit(Player.x,Player.y,Player.image,true) --Conker walk right --Aug 22, 2006 if pad:right() then moveRight() Player.x = Player.x+4 end --Conker walk left --Aug 23, 2006 if pad:left() then moveLeft() Player.x = Player.x-4 end --Conker attack --Aug 24, 2006 if pad:cross() and oldpad:cross()~=pad:cross() then if Player.image == Player1 or Player.image == Player2 or Player.image == Player3 or Player.image == Playerj then Player.image = Playera end if Player.image == Player1L or Player.image == Player2L or Player.image == Player3L or Player.image == Playerj2 then Player.image = Playera2 end end if Player.image == Playera then conkerPoint = conkerPoint + 1 end if Player.image == Playera2 then conkerPoint = conkerPoint + 1 end if Player.image == Playera and conkerPoint == 14 then Player.image = Player1 conkerPoint = 0 end if Player.image == Playera2 and conkerPoint == 14 then Player.image = Player1L conkerPoint = 0 end --Conker Jump --Aug 24, 2006 if pad:up() and pad:up() ~= oldpad:up() and Player.jumpstate == "ground" and Player.image ~= Playerc and Player.image ~= Playerp and Player.image ~= Playerc2 and Player.image ~= Playerp2 then Player.jumpstate = "jumping" end if Player.jumpstate == "jumping" then Player.jumpspeed = Player.jumpspeed - 0.5 Player.gravity = Player.gravity - Player.jumpspeed end if Player.gravity < 200 and Player.jumpstate == "falling" then Player.gravity = Player.gravity + (Player.jumpspeed + 3) end if Player.gravity == 200 then Player.jumpspeed = 10 Player.jumpstate = "ground" end if Player.jumpstate == "jumping" and Player.image == Player1 then Player.image = Playerj end if Player.jumpstate == "jumping" and Player.image == Player2 then Player.image = Playerj end if Player.jumpstate == "jumping" and Player.image == Player3 then Player.image = Playerj end if Player.jumpstate == "jumping" and Player.image == Player1L then Player.image = Playerj2 end if Player.jumpstate == "jumping" and Player.image == Player2L then Player.image = Playerj2 end if Player.jumpstate == "jumping" and Player.image == Player3L then Player.image = Playerj2 end if Player.jumpstate == "ground" and Player.image == Playerj then Player.image = Player1 end if Player.jumpstate == "ground" and Player.image == Playerj2 then Player.image = Player1L end if Player.gravity > 200 then Player.gravity = 200 end Player.y = Player.gravity --Healthbar --Aug 24, 2006 screen:fillRect(0,0,480,30,black) screen:fillRect(29,9,202,12,white) screen:fillRect(30,10,200,10,red) screen:fillRect(30,10,Player.health, healthbar.y, green) screen:print(30,0, "Health:" .. Player.health,green) screen:print(260,0,"Lives left:",green) screen:print(260,10,Player.lives,green) if Player.health <= -1 then Player.health = Player.health + 1 end if Player.health <= 0 and Player.lives > 0 then reSpawn() end if Player.lives == -1 then Player.lives = Player.lives + 1 end --Exit game --Aug 22, 2006 if pad:start() and oldpad:start()~=pad:start() then screen.waitVblankStart(10) while true do screen:clear() screen:blit(0,0,start) pad=Controls.read() if pad:up() and oldpad:up()~=pad:up() then sel=sel-1 elseif pad:down() and oldpad:down()~=pad:down() then sel=sel+1 end if sel<1 then sel=3 end if sel>3 then sel=1 end local choice={"Save","Save & Quit","Quit"} local chcol={editcolor,editcolor,editcolor,editcolor} chcol[sel]=selecolor screen:blit(190,106,start) screen:print(224,117,choice[1],chcol[1]) screen:print(196,127,choice[2],chcol[2]) screen:print(224,137,choice[3],chcol[3]) if pad:start() then break end if pad:cross() then if sel==1 or sel==2 then break end if sel==2 or sel==3 then break end break end end end screen.waitVblankStart() screen.flip() oldpad=pad end
-
08-27-2006, 05:17 PM #3394QJ Gamer Bronze
- Registriert seit
- Jul 2005
- Ort
- USA
- Beiträge
- 496
- Points
- 14.090
- Level
- 77
- Downloads
- 0
- Uploads
- 0
Sorry I don't understand all the concepts. I know that if you program in C then you must understand everything because its so much better than Lua.
Zitat von SG57
But thanks for the help anyways.
-
08-27-2006, 05:17 PM #3395words are stones in my <3

- Registriert seit
- Jul 2005
- Ort
- Spokane
- Beiträge
- 5.008
- Points
- 35.274
- Level
- 100
- My Mood
-
- Downloads
- 1
- Uploads
- 0
come on... interpret the error....... Its saying that 'sel' isn't a variable. You haven't declared 'sel' anywhere.
Just add: sel = 1
To the top of your script somewhere as a global variable.
...at what speed must I live.. to be able to see you again?...
Projects
You can support my Open World 3D RPG for PSP by voting for it here
-
08-27-2006, 05:55 PM #3396Developer

- Registriert seit
- Jun 2006
- Ort
- USA, Virginia
- Beiträge
- 580
- Points
- 5.650
- Level
- 48
- Downloads
- 0
- Uploads
- 0
thanks sg57, now it dosent error.. but it displays and goes away real fast.
-
08-27-2006, 06:08 PM #3397sceKernelExitGame();
- Registriert seit
- Jan 2006
- Ort
- New York
- Beiträge
- 3.126
- Points
- 19.955
- Level
- 89
- Downloads
- 0
- Uploads
- 0
add a extra screen.waitVblankStart(12 0) or w/e (thats for 2 seconds). That might help... which line is the error on, i dont want to count

btw, I recognize that animation ;)
-
08-27-2006, 06:13 PM #3398words are stones in my <3

- Registriert seit
- Jul 2005
- Ort
- Spokane
- Beiträge
- 5.008
- Points
- 35.274
- Level
- 100
- My Mood
-
- Downloads
- 1
- Uploads
- 0
That delay wont do anything to my understandings... Remove your screen:clear() statement when entering the loop. Place it outside the loop but still to be declared when START is pressed, that way it only clears the screen once, then starts to draw in the while loop.

...at what speed must I live.. to be able to see you again?...
Projects
You can support my Open World 3D RPG for PSP by voting for it here
-
08-27-2006, 06:33 PM #3399Developer

- Registriert seit
- Jun 2006
- Ort
- USA, Virginia
- Beiträge
- 580
- Points
- 5.650
- Level
- 48
- Downloads
- 0
- Uploads
- 0
is this what you were trying to tell me to do? Probably not cause it dosent do right either.. and i added the break in there so i can restart the script. I'm using an EBOOT.Code:if pad:select() then break end if pad:start() then screen:clear() end if pad:start() and oldpad:start()~=pad:start() then screen.waitVblankStart(10) while true do screen:blit(0,0,start) pad=Controls.read() if pad:up() and oldpad:up()~=pad:up() then sel=sel-1 elseif pad:down() and oldpad:down()~=pad:down() then sel=sel+1 end if pad:start() and oldpad:start()~=pad:start() then break end if sel<1 then sel=3 end if sel>3 then sel=1 end local choice={"Save","Save & Quit","Quit"} local chcol={editcolor,editcolor,editcolor,editcolor} chcol[sel]=selecolor screen:blit(190,106,start) screen:print(224,117,choice[1],chcol[1]) screen:print(196,127,choice[2],chcol[2]) screen:print(224,137,choice[3],chcol[3]) if pad:cross() then if sel==1 or sel==2 then break end if sel==2 or sel==3 then break end break end end end screen.waitVblankStart() screen.flip() oldpad=pad end
@bronx, i wonder why
-
08-27-2006, 07:36 PM #3400Developer

- Registriert seit
- Jul 2006
- Beiträge
- 205
- Points
- 4.318
- Level
- 41
- Downloads
- 0
- Uploads
- 0
Another way to do it would be to put "oldpad=pad" right after you check for the button press. That would make it so you don't need the delay. Also, it will act funky because you forgot to put that same line at the end of the while loop. Alternatively, you could just put that line once at the very top of the while loop. As long as it is in there, it will stop the start menu from exiting.
-
08-27-2006, 09:08 PM #3401Developer

- Registriert seit
- Jun 2006
- Ort
- USA, Virginia
- Beiträge
- 580
- Points
- 5.650
- Level
- 48
- Downloads
- 0
- Uploads
- 0
Thanks LMelior. I should have asked you in the first place
seeing as its your code.
-= Double Post =-
well, no same problem.. it pauses the game, when X or start is pressed it unpauses and displays the screen for a split second..Geändert von Branin (08-27-2006 um 09:08 PM Uhr) Grund: Automerged Doublepost
-
08-28-2006, 04:20 AM #3402
What do you mean by: "when X or start is pressed it unpauses and displays the screen for a split second"? Do you mean it shows the game and exits immediatly, OR do you mean it pauses for a split second and immediatly goes back to the game?
LUA manual:
[url]http://www.lua.org/manual/5.0/manual.html[/url]
LUA Wiki:
[url]http://wiki.ps2dev.org/psp:lua_player[/url]
-
08-28-2006, 04:57 AM #3403Developer

- Registriert seit
- Jul 2006
- Beiträge
- 205
- Points
- 4.318
- Level
- 41
- Downloads
- 0
- Uploads
- 0
Oh yeah, you also forgot to flip the screen in the while loop.
-
08-28-2006, 07:13 AM #3404QJ Gamer Green
- Registriert seit
- Nov 2005
- Ort
- Sweden
- Beiträge
- 460
- Points
- 6.520
- Level
- 52
- Downloads
- 0
- Uploads
- 0
STRANGE ERROR!
As soon as a try to .filip() with another image then screen, i get the "Loop in gettable" error.
I get error fore this(Not the acutall code, just a example)
The <- represents what gives me the error.
Code:background = Image.createEmpty(480, 272) background:blit(0,0,example) <- screen:blit(0,0,example) background.flip() <- screen.flip()
[CENTER]Some of my homebrew Applications/Games:
[URL=http://forums.qj.net/showthread.php?t=47294&page=1&pp=10]Planet Fighter[/URL] | [URL=http://forums.qj.net/showthread.php?p=641672#post641672]Graphic Creator (V2.0)[/URL] | [URL=http://forums.qj.net/showthread.php?p=512717]Fire Pong[/URL] | [B][URL="http://forums.qj.net/f-psp-development-forum-11/t-release-brushes-v20-99207.html#post1430891"][COLOR="Red"][SIZE="3"]Brushes v2.0[/COLOR][/SIZE][/B][/URL] [URL="http://forums.qj.net/f-psp-development-forum-11/t-release-brushes-v20-99207.html"][B][SIZE="2"][COLOR="Black"]Released![/COLOR][/SIZE][/B][/URL]
[URL="http://haxxblaster.2u.se/"][COLOR="black"][FONT="Arial Black"]www.HaxxBlaster.com[/FONT][/COLOR][/URL]
[URL="http://forums.qj.net/f-psp-development-forum-11/t-release-brushes-v20-99207.html"][IMG]http://img19.imageshack.us/img19/1346/brushesbannerqz3.png[/IMG][/URL][/CENTER]
-
08-28-2006, 01:20 PM #3405QJ Gamer Silver

- Registriert seit
- Jun 2006
- Ort
- UK
- Beiträge
- 2.326
- Points
- 10.263
- Level
- 67
- Downloads
- 0
- Uploads
- 0
"example" has to be a valid image.
You only flip the screen, you don't flip any other images.
-
08-28-2006, 02:24 PM #3406Developer

- Registriert seit
- Jun 2006
- Ort
- USA, Virginia
- Beiträge
- 580
- Points
- 5.650
- Level
- 48
- Downloads
- 0
- Uploads
- 0
Well, the screen:flip() worked just fine.. this isnt a question but for some reason you can only have a fully transarent image or either a colored image.. say in photoshop i made the image of the start menu frame and added a fully black layer over it.. well when i changed the opacity level to make it like a greyish transparent level it made the image fully black.. but when i deleted that layer its fully transparent.. wierd.
Geändert von Branin (08-28-2006 um 02:28 PM Uhr) Grund: Automerged Doublepost
-
08-28-2006, 04:34 PM #3407Banned from QJ for LIFE
- Registriert seit
- Jul 2006
- Beiträge
- 1.557
- Points
- 10.957
- Level
- 69
- Downloads
- 0
- Uploads
- 0
I'm trying to make a simple program that each time u press cross it reads the next or prefferably a random line in a .txt this is the best i can come up with but it doesnt work,
red = Color.new(255, 0, 0)
file = io.open("something.txt", "r")
ourline = file:read()
file:close()
while true do
screen:clear()
pad = Controls.read()
if pad:triangle() then
return
end
if pad:cross() then
screen
rint(10,10,ourline,red)
screen.waitVblankStart()
screen.flip()
end
looking forward to any help.
p.s i'm very new to lua so dont be mean :P
-= Double Post =-
anyone?
not that i'm impatient.. its just been 1 and a half hours and i cant see whats wrong with it :PGeändert von Mraellis (08-28-2006 um 04:34 PM Uhr) Grund: Automerged Doublepost
-
08-28-2006, 04:37 PM #3408sceKernelExitGame();
- Registriert seit
- Jan 2006
- Ort
- New York
- Beiträge
- 3.126
- Points
- 19.955
- Level
- 89
- Downloads
- 0
- Uploads
- 0
Anyone know how to use the Lua GU commands for 3D? I would really like to learn for lua as I learn the actual GU (I know, sounds stupid...)
-
08-28-2006, 07:55 PM #3409QJ Gamer Platinum
- Registriert seit
- Nov 2005
- Beiträge
- 5.272
- Points
- 32.631
- Level
- 100
- Downloads
- 0
- Uploads
- 0
can someone point me in the direction of the windows lua files?
[CENTER]
[SIZE=3][COLOR=Red]
[COLOR=black]I'm a Boy.
[COLOR=Red]: )[/COLOR][/COLOR]
[/COLOR][/SIZE]
[/CENTER]
-
08-28-2006, 07:57 PM #3410QJ Gamer Gold
- Registriert seit
- Mar 2006
- Ort
- LOLWUT
- Beiträge
- 2.625
- Points
- 18.627
- Level
- 86
- Downloads
- 0
- Uploads
- 0
http://evilmana.com/tutorials/lua_tutorial_01.php
Zitat von Hooger
OT - ZOMG!!!!!!!!!!!!!!!!!!!!! ! 1337 POST!!!!!!!!!!!!!!!!!!!!! !!!!!!!!!!!!!!!!!!!!!!!!! !!!!!1111!!!!one!!!!eleve n!!!!!!!!!!!!
=p
-
08-28-2006, 08:03 PM #3411QJ Gamer Platinum
- Registriert seit
- Nov 2005
- Beiträge
- 5.272
- Points
- 32.631
- Level
- 100
- Downloads
- 0
- Uploads
- 0
thanks mister leet guy
[CENTER]
[SIZE=3][COLOR=Red]
[COLOR=black]I'm a Boy.
[COLOR=Red]: )[/COLOR][/COLOR]
[/COLOR][/SIZE]
[/CENTER]
-
08-28-2006, 08:05 PM #3412words are stones in my <3

- Registriert seit
- Jul 2005
- Ort
- Spokane
- Beiträge
- 5.008
- Points
- 35.274
- Level
- 100
- My Mood
-
- Downloads
- 1
- Uploads
- 0
PSPduh - ... just ... lol
Bronx - Check your other post... And why not learn C GU if your doing LUA GU. Its pretty much the same, just the syntax is completely off...
...at what speed must I live.. to be able to see you again?...
Projects
You can support my Open World 3D RPG for PSP by voting for it here
-
08-28-2006, 08:31 PM #3413sceKernelExitGame();
- Registriert seit
- Jan 2006
- Ort
- New York
- Beiträge
- 3.126
- Points
- 19.955
- Level
- 89
- Downloads
- 0
- Uploads
- 0
Im learning both ;)
-
08-28-2006, 10:02 PM #3414QJ Gamer Green
- Registriert seit
- Nov 2005
- Ort
- Sweden
- Beiträge
- 460
- Points
- 6.520
- Level
- 52
- Downloads
- 0
- Uploads
- 0
Are you kidding me? I said that it wasen't the actuall code! It's a example!
Zitat von head_54us
It is inself the canvas that gives me error. And yes, here comes a example.
Code:board:blit(0,0, example)
Geändert von HaxxBlaster (08-28-2006 um 10:20 PM Uhr)
[CENTER]Some of my homebrew Applications/Games:
[URL=http://forums.qj.net/showthread.php?t=47294&page=1&pp=10]Planet Fighter[/URL] | [URL=http://forums.qj.net/showthread.php?p=641672#post641672]Graphic Creator (V2.0)[/URL] | [URL=http://forums.qj.net/showthread.php?p=512717]Fire Pong[/URL] | [B][URL="http://forums.qj.net/f-psp-development-forum-11/t-release-brushes-v20-99207.html#post1430891"][COLOR="Red"][SIZE="3"]Brushes v2.0[/COLOR][/SIZE][/B][/URL] [URL="http://forums.qj.net/f-psp-development-forum-11/t-release-brushes-v20-99207.html"][B][SIZE="2"][COLOR="Black"]Released![/COLOR][/SIZE][/B][/URL]
[URL="http://haxxblaster.2u.se/"][COLOR="black"][FONT="Arial Black"]www.HaxxBlaster.com[/FONT][/COLOR][/URL]
[URL="http://forums.qj.net/f-psp-development-forum-11/t-release-brushes-v20-99207.html"][IMG]http://img19.imageshack.us/img19/1346/brushesbannerqz3.png[/IMG][/URL][/CENTER]
-
08-28-2006, 11:58 PM #3415QJ Gamer Blue
- Registriert seit
- Jul 2006
- Ort
- Alabama
- Beiträge
- 142
- Points
- 4.241
- Level
- 41
- Downloads
- 0
- Uploads
- 0
Pretty sure of this:
Zitat von Branin
That's only in luaplayer for windows. Try it on the PSP and it will work fine, unless you aren't saving your transparency levels in Photoshop.
-
08-29-2006, 05:35 AM #3416Developer

- Registriert seit
- Jul 2006
- Beiträge
- 205
- Points
- 4.318
- Level
- 41
- Downloads
- 0
- Uploads
- 0
I'm not sure what you mean this time (this code looks fine to me), but his second sentence was the important part.
Zitat von HaxxBlaster
-
08-29-2006, 06:49 AM #3417QJ Gamer Green
- Registriert seit
- Nov 2005
- Ort
- Sweden
- Beiträge
- 460
- Points
- 6.520
- Level
- 52
- Downloads
- 0
- Uploads
- 0
I solved it, but it does not turn out the same way as the "screen.blit".
It can't display any transparency at all. It just skips the transparent pixels and show the solid ones, strange..Geändert von HaxxBlaster (08-29-2006 um 07:29 AM Uhr)
[CENTER]Some of my homebrew Applications/Games:
[URL=http://forums.qj.net/showthread.php?t=47294&page=1&pp=10]Planet Fighter[/URL] | [URL=http://forums.qj.net/showthread.php?p=641672#post641672]Graphic Creator (V2.0)[/URL] | [URL=http://forums.qj.net/showthread.php?p=512717]Fire Pong[/URL] | [B][URL="http://forums.qj.net/f-psp-development-forum-11/t-release-brushes-v20-99207.html#post1430891"][COLOR="Red"][SIZE="3"]Brushes v2.0[/COLOR][/SIZE][/B][/URL] [URL="http://forums.qj.net/f-psp-development-forum-11/t-release-brushes-v20-99207.html"][B][SIZE="2"][COLOR="Black"]Released![/COLOR][/SIZE][/B][/URL]
[URL="http://haxxblaster.2u.se/"][COLOR="black"][FONT="Arial Black"]www.HaxxBlaster.com[/FONT][/COLOR][/URL]
[URL="http://forums.qj.net/f-psp-development-forum-11/t-release-brushes-v20-99207.html"][IMG]http://img19.imageshack.us/img19/1346/brushesbannerqz3.png[/IMG][/URL][/CENTER]
-
08-29-2006, 03:49 PM #3418Banned from QJ for LIFE
- Registriert seit
- Jul 2006
- Beiträge
- 1.557
- Points
- 10.957
- Level
- 69
- Downloads
- 0
- Uploads
- 0
can someone plz say how i can get lua to read a random line from a txt file and print it to screen?
or show me how my code on the last page is wrong.
-
08-29-2006, 04:21 PM #3419QJ Gamer Blue
- Registriert seit
- Jul 2006
- Ort
- Alabama
- Beiträge
- 142
- Points
- 4.241
- Level
- 41
- Downloads
- 0
- Uploads
- 0
Mraellis, I can't tell you off the top of my head (I couldn't even write it out without a reference), but take a look at Snake (included in Luaplayer). It reads and writes from different lines of options.txt. I think the functions are called saveOptions() and loadOptions().
-
08-29-2006, 05:03 PM #3420
- Registriert seit
- Jul 2006
- Beiträge
- 36
- Points
- 3.957
- Level
- 40
- Downloads
- 0
- Uploads
- 0
ok im using the 5 bullet code from evil mana and i have it set up so that when the bullet enter a certain are (hits the target) the score goes up by one
i have it working but the score continues to go up repeatedly unless i fire 5 bullets out of the zone. here is my code
if Wario[1].y + 72 > BulletInfo[i].y and BulletInfo[i].x + 8 > Wario[1].x and BulletInfo[i].x < Wario[1].x + 107 then
BulletInfo[i].firing = false
score = score + 1
end
please tell me what to do to make the score go up by JUST one not one repeated


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