Seite 52 von 342 ErsteErste ... 2 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 102 152 ... LetzteLetzte
Zeige Ergebnis 1.531 bis 1.560 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; i guess that this is a problem with the values. mmmm im thinking.............

  
  1. #1531
    Developer
    Points: 7.499, Level: 57
    Level completed: 75%, Points required for next Level: 51
    Overall activity: 0%

    Registriert seit
    Mar 2006
    Ort
    Guadalajara
    Beiträge
    958
    Points
    7.499
    Level
    57
    Downloads
    0
    Uploads
    0

    Standard

    i guess that this is a problem with the values. mmmm im thinking..........



  2. #1532
    Developer
    Points: 7.499, Level: 57
    Level completed: 75%, Points required for next Level: 51
    Overall activity: 0%

    Registriert seit
    Mar 2006
    Ort
    Guadalajara
    Beiträge
    958
    Points
    7.499
    Level
    57
    Downloads
    0
    Uploads
    0

    Standard

    Zitat Zitat von TeamOverload
    What are all the sound formats supported, and are there any size limits?

    the most common are .wav, .it, .xm

    if the the size of the sound is higher than 5mb the game could be slower.

    correct me if im wrong.
    Geändert von MEXICANSNAKE (04-13-2006 um 06:41 PM Uhr)

  3. #1533
    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

    yeah i cant find any more bugs in the code , i wish i could figure this out!!!

  4. #1534
    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

    Zitat Zitat von bronxbomber92
    omg, i cant believe i missed that! thanks! but know i get error: index.lua:1: unexpected symbol near (little backward slash) { (little forward slash).
    sry i dont now if i can type those symbols i was describing...
    it means something is wrong in the first line of your file. Post that because green=Color.new(0,255,0) is correct

    BTW
    screenprint()
    should be
    screenrint()

    so with a ":"
    LUA manual:
    [url]http://www.lua.org/manual/5.0/manual.html[/url]

    LUA Wiki:
    [url]http://wiki.ps2dev.org/psp:lua_player[/url]

  5. #1535
    QJ Gamer Blue
    Points: 4.890, Level: 44
    Level completed: 70%, Points required for next Level: 60
    Overall activity: 0%

    Registriert seit
    Mar 2006
    Beiträge
    338
    Points
    4.890
    Level
    44
    Downloads
    0
    Uploads
    0

    Standard

    aside from what yall are talking about, how would i make a small loop inside a bigger loop? So i could hit break and have my code start over from the begining.

  6. #1536
    QJ Gamer Silver
    Points: 7.109, Level: 55
    Level completed: 80%, Points required for next Level: 41
    Overall activity: 0%

    Registriert seit
    Jun 2005
    Ort
    Puerto Rico
    Beiträge
    310
    Points
    7.109
    Level
    55
    Downloads
    0
    Uploads
    0

    Standard

    Zitat Zitat von c5cha7
    Once again this works:
    Code:
    --Load images
    bg = Image.load("bg.png")
    pic = {}
    pic[1] = Image.load("flapperleft1.png")
    pic[2] = Image.load("flapperleft2.png")
    imgpic=pic[1]
    
    --Begin the main loop
    while true do
    screen:blit(0, 0, bg)
    pad = Controls.read()
    
    if pad:cross() then
    imgpic=pic[2]
    else
    imgpic=pic[1]
    end
    
    screen:blit(0, 0, imgpic)
    screen.flip()
    end
    you just need a background know .
    Sorry I never checked yours. Thanks for your help. It works great.

  7. #1537
    Is in your zone.
    Points: 24.342, Level: 94
    Level completed: 99%, Points required for next Level: 8
    Overall activity: 0%

    Registriert seit
    Oct 2005
    Ort
    Jacksonville, FL
    Beiträge
    3.429
    Points
    24.342
    Level
    94
    Downloads
    0
    Uploads
    0

    Standard

    k... umm I have a loading screen as script.lua and then dofile game.lua but the loading screen keeps looping...

    --XBL Gamertag: PhenoM904--

  8. #1538
    11th Squad Captain
    Points: 26.490, Level: 97
    Level completed: 14%, Points required for next Level: 860
    Overall activity: 0%

    Registriert seit
    Jun 2005
    Ort
    You are here -----> 名前: アダム | 飲むコー&#1
    Beiträge
    2.562
    Points
    26.490
    Level
    97
    Downloads
    0
    Uploads
    0

    Standard

    Zitat Zitat von MaSt3r_ShAk3
    k... umm I have a loading screen as script.lua and then dofile game.lua but the loading screen keeps looping...
    Post your code and i will have a look :icon_wink .
    Or just try this in a while true loop>

    while true do
    loading=loading+1
    if loading 1 > and loading < 50 then
    screen:blit(0,0, loadingscreen)
    end
    if loading 49 > then
    back to script code here
    end
    etc...
    FAVORITE GAME! - BEER & ANIME! - SO EXICTING!

    開発者, 携帯用プログラマー 日本サポータおよび恋人 本名のアダムの鍛冶屋
    Currently Working On: - Flashmod V2.50 - Flashmod V2.60
    Currently Drinking: Coffee! - 私はコーヒーを飲む
    Chao Garden: DEMO v0.6
    Chao Garden V0.5b Review!

  9. #1539
    Is in your zone.
    Points: 24.342, Level: 94
    Level completed: 99%, Points required for next Level: 8
    Overall activity: 0%

    Registriert seit
    Oct 2005
    Ort
    Jacksonville, FL
    Beiträge
    3.429
    Points
    24.342
    Level
    94
    Downloads
    0
    Uploads
    0

    Standard

    ?? it started happening when I added collision detection (based on the tut)

    --XBL Gamertag: PhenoM904--

  10. #1540
    &lt;img src=&quot;images/smilies/psp.gif&quot; border=&quot;0&quot; alt=&quot;&quot; title=&quot;&quot; cl***=&quot;inlineimg&quot; /&gt; &lt;img src=&quot;images/smilies/Punk.gif&quot; border=&quot;0&quot; alt=&quot;&quot; title=&quot;&quot; cl***=&
    Points: 11.105, Level: 69
    Level completed: 64%, Points required for next Level: 145
    Overall activity: 0%

    Registriert seit
    Jun 2005
    Ort
    Canada
    Beiträge
    1.944
    Points
    11.105
    Level
    69
    Downloads
    0
    Uploads
    0

    Standard

    how do you say does not equal in lua,,
    i tried != but that doesnt work,,

  11. #1541
    Quality Haxing Since 1991
    Points: 29.255, Level: 99
    Level completed: 55%, Points required for next Level: 745
    Overall activity: 0%

    Registriert seit
    Oct 2005
    Ort
    Pennsylvania, USA Fi
    Beiträge
    6.206
    Points
    29.255
    Level
    99
    Downloads
    0
    Uploads
    0

    Standard

    Zitat Zitat von Sousanator
    how do you say does not equal in lua,,
    i tried != but that doesnt work,,
    ~=

    means not equal to.
    Zitat Zitat von Noriko
    I would call you gay but I love you.


    Wait ...huh.



  12. #1542
    &lt;img src=&quot;images/smilies/psp.gif&quot; border=&quot;0&quot; alt=&quot;&quot; title=&quot;&quot; cl***=&quot;inlineimg&quot; /&gt; &lt;img src=&quot;images/smilies/Punk.gif&quot; border=&quot;0&quot; alt=&quot;&quot; title=&quot;&quot; cl***=&
    Points: 11.105, Level: 69
    Level completed: 64%, Points required for next Level: 145
    Overall activity: 0%

    Registriert seit
    Jun 2005
    Ort
    Canada
    Beiträge
    1.944
    Points
    11.105
    Level
    69
    Downloads
    0
    Uploads
    0

    Standard

    its weird that its not !=, like every other languages i know,
    oh well,
    thanks though,

  13. #1543
    Is in your zone.
    Points: 24.342, Level: 94
    Level completed: 99%, Points required for next Level: 8
    Overall activity: 0%

    Registriert seit
    Oct 2005
    Ort
    Jacksonville, FL
    Beiträge
    3.429
    Points
    24.342
    Level
    94
    Downloads
    0
    Uploads
    0

    Standard

    Umm, is there an alternative for collision other than that tutorial? it makes my loading screen loop forever...

    --XBL Gamertag: PhenoM904--

  14. #1544
    QJ Gamer Bronze
    Points: 8.803, Level: 63
    Level completed: 18%, Points required for next Level: 247
    Overall activity: 0%

    Registriert seit
    Jan 2006
    Ort
    Western Australia
    Beiträge
    1.046
    Points
    8.803
    Level
    63
    Downloads
    0
    Uploads
    0

    Standard

    Offtopic: ^^^ what's the story of your screen name?

  15. #1545
    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

    Hey MaSt3r_ShAk3 whats that tutorial your talking about? Mind giving me the link?
    LUA manual:
    [url]http://www.lua.org/manual/5.0/manual.html[/url]

    LUA Wiki:
    [url]http://wiki.ps2dev.org/psp:lua_player[/url]

  16. #1546
    QJ Gamer Bronze
    Points: 8.803, Level: 63
    Level completed: 18%, Points required for next Level: 247
    Overall activity: 0%

    Registriert seit
    Jan 2006
    Ort
    Western Australia
    Beiträge
    1.046
    Points
    8.803
    Level
    63
    Downloads
    0
    Uploads
    0

  17. #1547
    Jesus loves me more.
    Points: 11.452, Level: 70
    Level completed: 51%, Points required for next Level: 198
    Overall activity: 0%

    Registriert seit
    Mar 2006
    Ort
    Illegal Abric Sites
    Beiträge
    1.551
    Points
    11.452
    Level
    70
    Downloads
    0
    Uploads
    0

    Standard

    how do i insert a pause, i have text apear but the next line of text comes to quick


  18. #1548
    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

    Zitat Zitat von PopcOrn DeVil
    Yeah i just found it myself, thx though!

    @Mori
    Use screen.waitVblanck([miliseconds]) or whatever the code exactly is. Where miliseconds is the amount of miliseconds you want the pause to be.
    LUA manual:
    [url]http://www.lua.org/manual/5.0/manual.html[/url]

    LUA Wiki:
    [url]http://wiki.ps2dev.org/psp:lua_player[/url]

  19. #1549
    Jesus loves me more.
    Points: 11.452, Level: 70
    Level completed: 51%, Points required for next Level: 198
    Overall activity: 0%

    Registriert seit
    Mar 2006
    Ort
    Illegal Abric Sites
    Beiträge
    1.551
    Points
    11.452
    Level
    70
    Downloads
    0
    Uploads
    0

    Standard

    thank you


  20. #1550
    Jesus loves me more.
    Points: 11.452, Level: 70
    Level completed: 51%, Points required for next Level: 198
    Overall activity: 0%

    Registriert seit
    Mar 2006
    Ort
    Illegal Abric Sites
    Beiträge
    1.551
    Points
    11.452
    Level
    70
    Downloads
    0
    Uploads
    0

    Standard

    it did not work


  21. #1551
    Jesus loves me more.
    Points: 11.452, Level: 70
    Level completed: 51%, Points required for next Level: 198
    Overall activity: 0%

    Registriert seit
    Mar 2006
    Ort
    Illegal Abric Sites
    Beiträge
    1.551
    Points
    11.452
    Level
    70
    Downloads
    0
    Uploads
    0

    Standard

    How do i get a background that is the size of the screen?

    also how could i get it to change the pick when a button is pressed
    Geändert von GWKYOU (04-15-2006 um 04:37 AM Uhr) Grund: also


  22. #1552
    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

    Zitat Zitat von Mori
    How do i get a background that is the size of the screen?
    By making it 480x272

    also how could i get it to change the pick when a button is pressed
    something like this works

    pad=Controls.read()
    if pad:cross() then
    screen:blit(0,0,[otherpic],0,0,otherpic:width(),oth erpic:height())
    end
    LUA manual:
    [url]http://www.lua.org/manual/5.0/manual.html[/url]

    LUA Wiki:
    [url]http://wiki.ps2dev.org/psp:lua_player[/url]

  23. #1553
    Jesus loves me more.
    Points: 11.452, Level: 70
    Level completed: 51%, Points required for next Level: 198
    Overall activity: 0%

    Registriert seit
    Mar 2006
    Ort
    Illegal Abric Sites
    Beiträge
    1.551
    Points
    11.452
    Level
    70
    Downloads
    0
    Uploads
    0

    Standard

    so would i do

    Pick1 = Image.load("Pick1.png")
    Pick2= Image.load("Pick2.png")
    screen:blit(480, 272, Pick1, [alpha = flase])
    end
    pad=Controls.read()
    if pad:r() then
    screen:bilt(480, 272, Pick2, [alpha= false])
    end

    ??


  24. #1554
    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

    Almost

    Pick1 = Image.load("Pick1.png")
    Pick2= Image.load("Pick2.png")
    screen:blit(480, 272, Pick1, [alpha = flase])
    end <-- this should be gone as there is no loop or anything like that before this
    pad=Controls.read()
    if pad:r() then
    screen:bilt(480, 272, Pick2, [alpha= false])
    end


    Also the screen:blit thingies should have more arguments, so like this:
    screen:blit(0,0,[otherpic],0,0,otherpic:width(),oth erpic:height())
    LUA manual:
    [url]http://www.lua.org/manual/5.0/manual.html[/url]

    LUA Wiki:
    [url]http://wiki.ps2dev.org/psp:lua_player[/url]

  25. #1555
    Jesus loves me more.
    Points: 11.452, Level: 70
    Level completed: 51%, Points required for next Level: 198
    Overall activity: 0%

    Registriert seit
    Mar 2006
    Ort
    Illegal Abric Sites
    Beiträge
    1.551
    Points
    11.452
    Level
    70
    Downloads
    0
    Uploads
    0

    Standard

    Pick1= Image.load("Pick1.png")
    Pick2= Image.load(Pick2.png")
    screen:bilt( 480, 272, [Pick1],480,272,Pick1:width(480) , oth erpic:hight(272))
    pad=Conrols.read()
    if pad.r()then
    screen:bilt( 480, 272, [Pick2],480,272,Pick2:width(480) , oth erpic:hight(272))
    end


  26. #1556
    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

    Pick1= Image.load("Pick1.png")
    Pick2= Image.load("Pick2.png")
    screen:blit( 480, 272, Pick1,480,272,Pick1:width () , otherpic:hight())
    pad=Conrols.read()
    if pad.r()then
    screen:blit( 480, 272, Pick2,480,272,Pick2:width () , otherpic:hight())
    end

    its blit instead of bilt
    The "[" and "]" were to show it you should put there your own name they are not to be included
    [pic]:width() and height() return the width and height of the pic so you dont need to put those between the brackets.
    LUA manual:
    [url]http://www.lua.org/manual/5.0/manual.html[/url]

    LUA Wiki:
    [url]http://wiki.ps2dev.org/psp:lua_player[/url]

  27. #1557
    Jesus loves me more.
    Points: 11.452, Level: 70
    Level completed: 51%, Points required for next Level: 198
    Overall activity: 0%

    Registriert seit
    Mar 2006
    Ort
    Illegal Abric Sites
    Beiträge
    1.551
    Points
    11.452
    Level
    70
    Downloads
    0
    Uploads
    0

    Standard

    I cant seem to get it to work hmm let me upload my Lua


    let me know if you see any thing rong
    Angehängte Dateien Angehängte Dateien


  28. #1558
    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

    This should work (look at the things i changed, because you had some small errors but important ones):
    Code:
    -- Rock actions
    green = Color.new(255,64,64)
    upPressed = 'You try to feed your rock'
    downPressed = 'You pet your rock'
    leftPressed = 'You Kick your Rock'
    rightPressed = 'You look at your Rock'
    LPressed = 'You give our rock some of its meds....'
    
    
    -- you should put this before the loop otherwise it keeps on loading them.
    Pick1= Image.load("Rock-1.png")
    Pick2= Image.load("Rock-2.png")
    
    
    -- *****Main Loop******
    while true do
    
    screen:clear()
    
    pad = Controls.read()
    if pad:down() then
    screen:print(15,252,downPressed,green)
    end
    if pad:left() then
    screen:print(15,252,leftPressed,green)
    end
    if pad:right() then
    screen:print(15,252,rightPressed,green)
    end
    if pad:l() then
    screen:print(15,252,LPressed,green)
    end
    if pad:up() then
    screen:print(15,252,upPressed,green)
    end
    
    -- Rocks
    
    screen:blit( 0, 0, Pick1,0,0,Pick1:width(), Pick1:height())
    
    if pad.r()then
    screen:blit( 0, 0, Pick2,0,0,Pick2:width(), Pick2:height())
    end
    
    screen.waitVblankStart()
    screen.flip()
    end
    LUA manual:
    [url]http://www.lua.org/manual/5.0/manual.html[/url]

    LUA Wiki:
    [url]http://wiki.ps2dev.org/psp:lua_player[/url]

  29. #1559
    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

    Does anybody know what the specs of an IT file should be to run properly? I have 8 bit and 12000kbit/s but only the first 30 seconds will play. Same happens with those specs on an XM file, it drives me nuts!

    EDIT: ok it more tests:
    It doesn't even play when its 8kHz/16kHz
    Plays even shorter when its 11025Hz/22050Hz
    Also plays shorter when its 16bit and 12000Hz
    Geändert von Altair (04-15-2006 um 07:22 AM Uhr)
    LUA manual:
    [url]http://www.lua.org/manual/5.0/manual.html[/url]

    LUA Wiki:
    [url]http://wiki.ps2dev.org/psp:lua_player[/url]

  30. #1560
    Jesus loves me more.
    Points: 11.452, Level: 70
    Level completed: 51%, Points required for next Level: 198
    Overall activity: 0%

    Registriert seit
    Mar 2006
    Ort
    Illegal Abric Sites
    Beiträge
    1.551
    Points
    11.452
    Level
    70
    Downloads
    0
    Uploads
    0

    Standard

    ty so much



 

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:54 AM Uhr.

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