Seite 114 von 342 ErsteErste ... 14 64 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 164 214 ... LetzteLetzte
Zeige Ergebnis 3.391 bis 3.420 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; Wow. I messed up something. If all of the Enemies' states are equal to "dead", then I want it to ...

  
  1. #3391
    QJ Gamer Bronze
    Points: 14.090, Level: 77
    Level completed: 10%, Points required for next Level: 360
    Overall activity: 0%

    Registriert seit
    Jul 2005
    Ort
    USA
    Beiträge
    496
    Points
    14.090
    Level
    77
    Downloads
    0
    Uploads
    0

    Standard

    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.



  2. #3392
    words are stones in my <3
    Points: 35.274, Level: 100
    Level completed: 0%, Points required for next Level: 0
    Overall activity: 0%

    Registriert seit
    Jul 2005
    Ort
    Spokane
    Beiträge
    5.008
    Points
    35.274
    Level
    100
    My Mood
    Lonely
    Downloads
    1
    Uploads
    0

    Standard

    Please... Before making a game, understand the concept of programming and the routines used to do what you want.
    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
    This is the most efficient way I see fit.

    ...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


  3. #3393
    Developer
    Points: 5.650, Level: 48
    Level completed: 50%, Points required for next Level: 100
    Overall activity: 0%

    Registriert seit
    Jun 2006
    Ort
    USA, Virginia
    Beiträge
    580
    Points
    5.650
    Level
    48
    Downloads
    0
    Uploads
    0

    Standard

    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

  4. #3394
    QJ Gamer Bronze
    Points: 14.090, Level: 77
    Level completed: 10%, Points required for next Level: 360
    Overall activity: 0%

    Registriert seit
    Jul 2005
    Ort
    USA
    Beiträge
    496
    Points
    14.090
    Level
    77
    Downloads
    0
    Uploads
    0

    Standard

    Zitat Zitat von SG57
    Please... Before making a game, understand the concept of programming and the routines used to do what you want.
    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.

    But thanks for the help anyways.

  5. #3395
    words are stones in my <3
    Points: 35.274, Level: 100
    Level completed: 0%, Points required for next Level: 0
    Overall activity: 0%

    Registriert seit
    Jul 2005
    Ort
    Spokane
    Beiträge
    5.008
    Points
    35.274
    Level
    100
    My Mood
    Lonely
    Downloads
    1
    Uploads
    0

    Standard

    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


  6. #3396
    Developer
    Points: 5.650, Level: 48
    Level completed: 50%, Points required for next Level: 100
    Overall activity: 0%

    Registriert seit
    Jun 2006
    Ort
    USA, Virginia
    Beiträge
    580
    Points
    5.650
    Level
    48
    Downloads
    0
    Uploads
    0

    Standard

    thanks sg57, now it dosent error.. but it displays and goes away real fast.

  7. #3397
    sceKernelExitGame();
    Points: 19.955, Level: 89
    Level completed: 21%, Points required for next Level: 395
    Overall activity: 0%

    Registriert seit
    Jan 2006
    Ort
    New York
    Beiträge
    3.126
    Points
    19.955
    Level
    89
    Downloads
    0
    Uploads
    0

    Standard

    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 ;)

  8. #3398
    words are stones in my <3
    Points: 35.274, Level: 100
    Level completed: 0%, Points required for next Level: 0
    Overall activity: 0%

    Registriert seit
    Jul 2005
    Ort
    Spokane
    Beiträge
    5.008
    Points
    35.274
    Level
    100
    My Mood
    Lonely
    Downloads
    1
    Uploads
    0

    Standard

    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


  9. #3399
    Developer
    Points: 5.650, Level: 48
    Level completed: 50%, Points required for next Level: 100
    Overall activity: 0%

    Registriert seit
    Jun 2006
    Ort
    USA, Virginia
    Beiträge
    580
    Points
    5.650
    Level
    48
    Downloads
    0
    Uploads
    0

    Standard

    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
    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.

    @bronx, i wonder why

  10. #3400
    Developer
    Points: 4.318, Level: 41
    Level completed: 84%, Points required for next Level: 32
    Overall activity: 0%

    Registriert seit
    Jul 2006
    Beiträge
    205
    Points
    4.318
    Level
    41
    Downloads
    0
    Uploads
    0

    Standard

    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.

  11. #3401
    Developer
    Points: 5.650, Level: 48
    Level completed: 50%, Points required for next Level: 100
    Overall activity: 0%

    Registriert seit
    Jun 2006
    Ort
    USA, Virginia
    Beiträge
    580
    Points
    5.650
    Level
    48
    Downloads
    0
    Uploads
    0

    Standard

    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

  12. #3402
    QJ Gamer Green
    Points: 5.559, Level: 48
    Level completed: 5%, Points required for next Level: 191
    Overall activity: 0%

    Registriert seit
    Jan 2006
    Beiträge
    506
    Points
    5.559
    Level
    48
    Downloads
    0
    Uploads
    0

    Standard

    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]

  13. #3403
    Developer
    Points: 4.318, Level: 41
    Level completed: 84%, Points required for next Level: 32
    Overall activity: 0%

    Registriert seit
    Jul 2006
    Beiträge
    205
    Points
    4.318
    Level
    41
    Downloads
    0
    Uploads
    0

    Standard

    Oh yeah, you also forgot to flip the screen in the while loop.

  14. #3404
    QJ Gamer Green
    Points: 6.520, Level: 52
    Level completed: 85%, Points required for next Level: 30
    Overall activity: 0%

    Registriert seit
    Nov 2005
    Ort
    Sweden
    Beiträge
    460
    Points
    6.520
    Level
    52
    Downloads
    0
    Uploads
    0

    Standard

    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]

  15. #3405
    QJ Gamer Silver
    Points: 10.263, Level: 67
    Level completed: 54%, Points required for next Level: 187
    Overall activity: 0%

    Registriert seit
    Jun 2006
    Ort
    UK
    Beiträge
    2.326
    Points
    10.263
    Level
    67
    Downloads
    0
    Uploads
    0

    Standard

    "example" has to be a valid image.
    You only flip the screen, you don't flip any other images.

  16. #3406
    Developer
    Points: 5.650, Level: 48
    Level completed: 50%, Points required for next Level: 100
    Overall activity: 0%

    Registriert seit
    Jun 2006
    Ort
    USA, Virginia
    Beiträge
    580
    Points
    5.650
    Level
    48
    Downloads
    0
    Uploads
    0

    Standard

    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

  17. #3407
    Banned from QJ for LIFE
    Points: 10.957, Level: 69
    Level completed: 27%, Points required for next Level: 293
    Overall activity: 0%

    Registriert seit
    Jul 2006
    Beiträge
    1.557
    Points
    10.957
    Level
    69
    Downloads
    0
    Uploads
    0

    Standard

    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
    screenrint(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 :P
    Geändert von Mraellis (08-28-2006 um 04:34 PM Uhr) Grund: Automerged Doublepost

  18. #3408
    sceKernelExitGame();
    Points: 19.955, Level: 89
    Level completed: 21%, Points required for next Level: 395
    Overall activity: 0%

    Registriert seit
    Jan 2006
    Ort
    New York
    Beiträge
    3.126
    Points
    19.955
    Level
    89
    Downloads
    0
    Uploads
    0

    Standard

    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...)

  19. #3409
    QJ Gamer Platinum
    Points: 32.631, Level: 100
    Level completed: 0%, Points required for next Level: 0
    Overall activity: 0%

    Registriert seit
    Nov 2005
    Beiträge
    5.272
    Points
    32.631
    Level
    100
    Downloads
    0
    Uploads
    0

    Standard

    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]

  20. #3410
    QJ Gamer Gold
    Points: 18.627, Level: 86
    Level completed: 56%, Points required for next Level: 223
    Overall activity: 0%

    Registriert seit
    Mar 2006
    Ort
    LOLWUT
    Beiträge
    2.625
    Points
    18.627
    Level
    86
    Downloads
    0
    Uploads
    0

    Standard

    Zitat Zitat von Hooger
    can someone point me in the direction of the windows lua files?
    http://evilmana.com/tutorials/lua_tutorial_01.php

    OT - ZOMG!!!!!!!!!!!!!!!!!!!!! ! 1337 POST!!!!!!!!!!!!!!!!!!!!! !!!!!!!!!!!!!!!!!!!!!!!!! !!!!!1111!!!!one!!!!eleve n!!!!!!!!!!!!

    =p

  21. #3411
    QJ Gamer Platinum
    Points: 32.631, Level: 100
    Level completed: 0%, Points required for next Level: 0
    Overall activity: 0%

    Registriert seit
    Nov 2005
    Beiträge
    5.272
    Points
    32.631
    Level
    100
    Downloads
    0
    Uploads
    0

    Standard

    thanks mister leet guy
    [CENTER]
    [SIZE=3][COLOR=Red]
    [COLOR=black]I'm a Boy.
    [COLOR=Red]: )[/COLOR][/COLOR]
    [/COLOR][/SIZE]
    [/CENTER]

  22. #3412
    words are stones in my <3
    Points: 35.274, Level: 100
    Level completed: 0%, Points required for next Level: 0
    Overall activity: 0%

    Registriert seit
    Jul 2005
    Ort
    Spokane
    Beiträge
    5.008
    Points
    35.274
    Level
    100
    My Mood
    Lonely
    Downloads
    1
    Uploads
    0

    Standard

    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


  23. #3413
    sceKernelExitGame();
    Points: 19.955, Level: 89
    Level completed: 21%, Points required for next Level: 395
    Overall activity: 0%

    Registriert seit
    Jan 2006
    Ort
    New York
    Beiträge
    3.126
    Points
    19.955
    Level
    89
    Downloads
    0
    Uploads
    0

    Standard

    Im learning both ;)

  24. #3414
    QJ Gamer Green
    Points: 6.520, Level: 52
    Level completed: 85%, Points required for next Level: 30
    Overall activity: 0%

    Registriert seit
    Nov 2005
    Ort
    Sweden
    Beiträge
    460
    Points
    6.520
    Level
    52
    Downloads
    0
    Uploads
    0

    Standard

    Zitat Zitat von head_54us
    "example" has to be a valid image.
    You only flip the screen, you don't flip any other images.
    Are you kidding me? I said that it wasen't the actuall code! It's a example!
    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]

  25. #3415
    QJ Gamer Blue
    Points: 4.241, Level: 41
    Level completed: 46%, Points required for next Level: 109
    Overall activity: 0%

    Registriert seit
    Jul 2006
    Ort
    Alabama
    Beiträge
    142
    Points
    4.241
    Level
    41
    Downloads
    0
    Uploads
    0

    Standard

    Zitat Zitat von Branin
    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.
    Pretty sure of this:
    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.

  26. #3416
    Developer
    Points: 4.318, Level: 41
    Level completed: 84%, Points required for next Level: 32
    Overall activity: 0%

    Registriert seit
    Jul 2006
    Beiträge
    205
    Points
    4.318
    Level
    41
    Downloads
    0
    Uploads
    0

    Standard

    Zitat Zitat von HaxxBlaster
    Zitat Zitat von head54_us
    "example" has to be a valid image.
    You only flip the screen, you don't flip any other images.
    Are you kidding me? I said that it wasen't the actuall code! It's a example!
    It is inself the canvas that gives me error. And yes, here comes a example.
    Code:
    board:blit(0,0, example)
    I'm not sure what you mean this time (this code looks fine to me), but his second sentence was the important part.

  27. #3417
    QJ Gamer Green
    Points: 6.520, Level: 52
    Level completed: 85%, Points required for next Level: 30
    Overall activity: 0%

    Registriert seit
    Nov 2005
    Ort
    Sweden
    Beiträge
    460
    Points
    6.520
    Level
    52
    Downloads
    0
    Uploads
    0

    Standard

    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]

  28. #3418
    Banned from QJ for LIFE
    Points: 10.957, Level: 69
    Level completed: 27%, Points required for next Level: 293
    Overall activity: 0%

    Registriert seit
    Jul 2006
    Beiträge
    1.557
    Points
    10.957
    Level
    69
    Downloads
    0
    Uploads
    0

    Standard

    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.

  29. #3419
    QJ Gamer Blue
    Points: 4.241, Level: 41
    Level completed: 46%, Points required for next Level: 109
    Overall activity: 0%

    Registriert seit
    Jul 2006
    Ort
    Alabama
    Beiträge
    142
    Points
    4.241
    Level
    41
    Downloads
    0
    Uploads
    0

    Standard

    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().

  30. #3420
    Points: 3.957, Level: 40
    Level completed: 4%, Points required for next Level: 193
    Overall activity: 0%

    Registriert seit
    Jul 2006
    Beiträge
    36
    Points
    3.957
    Level
    40
    Downloads
    0
    Uploads
    0

    Standard

    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


 

Tags for this Thread

Forumregeln

  • Es ist Ihnen nicht erlaubt, neue Themen zu verfassen.
  • Es ist Ihnen nicht erlaubt, auf Beiträge zu antworten.
  • Es ist Ihnen nicht erlaubt, Anhänge hochzuladen.
  • Es ist Ihnen nicht erlaubt, Ihre Beiträge zu bearbeiten.
  •  





Alle Zeitangaben in WEZ -8. Es ist jetzt 07:53 AM Uhr.

Use of this Web site constitutes acceptance of the TERMS & CONDITIONS and PRIVACY POLICY
Copyright © , Caputo Media, LLC. All Rights Reserved. Cluster .