Seite 55 von 342 ErsteErste ... 5 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 105 155 ... LetzteLetzte
Zeige Ergebnis 1.621 bis 1.650 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; IS it possible to convert a WAV file to a IT file? If so how? Thankyou....

  
  1. #1621
    Developer
    Points: 12.360, Level: 72
    Level completed: 78%, Points required for next Level: 90
    Overall activity: 0%

    Registriert seit
    Mar 2006
    Ort
    Isle of Wight
    Beiträge
    491
    Points
    12.360
    Level
    72
    Downloads
    0
    Uploads
    0

    Standard

    IS it possible to convert a WAV file to a IT file? If so how? Thankyou.




    PM me for a sig like this!

    http://dspspforums.com/forums/index.php SIGN UP NOW!

  2. #1622
    <img src="images/smilies/psp.gif" border="0" alt="" title="" cl***="inlineimg" /> <img src="images/smilies/Punk.gif" border="0" alt="" title="" 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

    Zitat Zitat von PopcOrn DeVil
    *puzzled*, hmm, I might just wait for someone to release a loading type thing and I'll learn from that.
    look at some prievous games that use the highscore save thing,,
    like shines snake or other ones,,

    Edit: on another note,, how do you say
    if num1 == n1 or num1 == n2 or num1 == n3 or num1 == n4 or num1 == n5 or num1 == n6 then
    <whatever>

    easily???(less lines of code)
    Geändert von Sousanator (04-16-2006 um 09:18 AM Uhr)

  3. #1623
    Think, Do, Gloat.
    Points: 12.687, Level: 73
    Level completed: 60%, Points required for next Level: 163
    Overall activity: 0%

    Registriert seit
    Nov 2005
    Ort
    England, Norwich
    Beiträge
    1.422
    Points
    12.687
    Level
    73
    Downloads
    0
    Uploads
    0

    Standard

    Zitat Zitat von kozine
    IS it possible to convert a WAV file to a IT file? If so how? Thankyou.
    You should have just asked on MSN, but yes it is possible.
    Just use open mod plug.
    Open up the wav, and just press save and it will be an IT, alternatively...just send it to me now...

  4. #1624
    Your Fate is Grim...
    Points: 11.640, Level: 70
    Level completed: 98%, Points required for next Level: 10
    Overall activity: 0%

    Registriert seit
    Oct 2005
    Beiträge
    2.269
    Points
    11.640
    Level
    70
    Downloads
    0
    Uploads
    0

    Standard

    question: it is ok with pspmillionaire if i used his bullet firing snippet, but edited it a little??i cant think of any other way to fire bullets.
    --------------------------------------------------------------------------------------

  5. #1625
    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

    Im sure it is. Everything lua is open source

    --XBL Gamertag: PhenoM904--

  6. #1626
    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

    Does anyone know of a site where I can get sound effects in wav format?

    --XBL Gamertag: PhenoM904--

  7. #1627
    QJ Gamer Silver
    Points: 9.678, Level: 66
    Level completed: 7%, Points required for next Level: 372
    Overall activity: 0%

    Registriert seit
    Jun 2005
    Ort
    The Migrant Fleet
    Beiträge
    908
    Points
    9.678
    Level
    66
    Downloads
    0
    Uploads
    0

    Standard

    What's wrong with this code? It wont work at all.




    background = Image.load("background.pn g")
    mouse1 = Image.load("mouse1.png")

    mouse.x = 100
    mouse.y = 272

    while true do
    screen:blit(0, 0, background, false)
    end

    pad = Controls.read

    if pad:up() then
    mouse.y = mouse.y + 1
    screen:blit(mouse.x, mouse.y, mouse1)
    end

    if pad:down() then
    mouse.y = mouse.y - 1
    screen:blit(mouse.x, mouse.y, mouse1)
    end

    if pad:left() then
    mouse.x = mouse.x - 1
    screen:blit(mouse.x, mouse.y, mouse1)
    end

    if pad:right() then
    mouse.x = mouse.x + 1
    screen:blit(mouse.x, mouse.y, mouse1)
    end

  8. #1628
    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
    Does anyone know of a site where I can get sound effects in wav format?
    I am looking for the same thing :icon_wink .
    I found a site that has .mod sounds though >
    http://www.modarchive.com/
    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. #1629
    TheMarioKarters
    Guest

    Standard

    Zitat Zitat von MaSt3r_ShAk3
    Im sure it is. Everything lua is open source
    Unless you compile it.

  10. #1630
    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 montrob
    What's wrong with this code? It wont work at all.




    background = Image.load("background.pn g")
    mouse1 = Image.load("mouse1.png")

    mouse.x = 100
    mouse.y = 272

    while true do
    screen:blit(0, 0, background, false)

    pad = Controls.read

    if pad:up() then
    mouse.y = mouse.y + 1
    screen:blit(mouse.x, mouse.y, mouse1)
    end

    if pad:down() then
    mouse.y = mouse.y - 1
    screen:blit(mouse.x, mouse.y, mouse1)
    end

    if pad:left() then
    mouse.x = mouse.x - 1
    screen:blit(mouse.x, mouse.y, mouse1)
    end

    if pad:right() then
    mouse.x = mouse.x + 1
    screen:blit(mouse.x, mouse.y, mouse1)
    end
    end
    Fixed!
    Your while true loop was wrong ;) .
    Your suppost to include your pad functions
    then put end at the end of your code.
    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!

  11. #1631
    QJ Gamer Silver
    Points: 9.678, Level: 66
    Level completed: 7%, Points required for next Level: 372
    Overall activity: 0%

    Registriert seit
    Jun 2005
    Ort
    The Migrant Fleet
    Beiträge
    908
    Points
    9.678
    Level
    66
    Downloads
    0
    Uploads
    0

    Standard

    I still get this error - "attempt to index global 'mouse' <a nil value>

  12. #1632
    Your Fate is Grim...
    Points: 11.640, Level: 70
    Level completed: 98%, Points required for next Level: 10
    Overall activity: 0%

    Registriert seit
    Oct 2005
    Beiträge
    2.269
    Points
    11.640
    Level
    70
    Downloads
    0
    Uploads
    0

    Standard

    1 moe queston: how would i make collision for a stick figure?? would i have to do it in seperate parts? thx.
    --------------------------------------------------------------------------------------

  13. #1633
    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

    Zitat Zitat von c5cha7
    I am looking for the same thing :icon_wink .
    I found a site that has .mod sounds though >
    http://www.modarchive.com/
    I found a site http://simplythebest.net/sounds/WAV/WAV_sounds.html

    --XBL Gamertag: PhenoM904--

  14. #1634
    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

    Zitat Zitat von Grimfate126
    1 moe queston: how would i make collision for a stick figure?? would i have to do it in seperate parts? thx.
    i have done if for my game. u just cant use the magic wand tool in photohop. it has to be rectangular. the collision still works fine tho

    --XBL Gamertag: PhenoM904--

  15. #1635
    Your Fate is Grim...
    Points: 11.640, Level: 70
    Level completed: 98%, Points required for next Level: 10
    Overall activity: 0%

    Registriert seit
    Oct 2005
    Beiträge
    2.269
    Points
    11.640
    Level
    70
    Downloads
    0
    Uploads
    0

    Standard

    Zitat Zitat von MaSt3r_ShAk3
    i have done if for my game. u just cant use the magic wand tool in photohop. it has to be rectangular. the collision still works fine tho
    ??? huh? my stik figure has a round head. i want it so that when u shoot a bullet at a certain part, and it HITS the part,(thats where the collisions come in)then, it will do something. so how would u do that for a circle. sry, if i sound confusing. thx


    P.S. to montrob, try this:

    Code:
    background = Image.load("background.png")
    mouse1 = Image.load("mouse1.png")
    
    mouse.x = 100
    mouse.y = 272
    
    while true do
    
    screen:blit(0, 0, background, false)
    screen:blit(mouse.x, mouse.y, mouse1)
    
    pad = Controls.read
    
    if pad:up() then
    mouse.y = mouse.y + 1
    end
    
    if pad:down() then
    mouse.y = mouse.y - 1
    end
    
    if pad:left() then
    mouse.x = mouse.x - 1
    end
    
    if pad:right() then
    mouse.x = mouse.x + 1
    end
    
    screen.waitVblankStart()
    screen:flip()
    end
    --------------------------------------------------------------------------------------

  16. #1636
    QJ Gamer Silver
    Points: 9.678, Level: 66
    Level completed: 7%, Points required for next Level: 372
    Overall activity: 0%

    Registriert seit
    Jun 2005
    Ort
    The Migrant Fleet
    Beiträge
    908
    Points
    9.678
    Level
    66
    Downloads
    0
    Uploads
    0

    Standard

    Zitat Zitat von Grimfate126
    ??? huh? my stik figure has a round head. i want it so that when u shoot a bullet at a certain part, and it HITS the part,(thats where the collisions come in)then, it will do something. so how would u do that for a circle. sry, if i sound confusing. thx


    P.S. to montrob, try this:

    Code:
    background = Image.load("background.png")
    mouse1 = Image.load("mouse1.png")
    
    mouse.x = 100
    mouse.y = 272
    
    while true do
    
    screen:blit(0, 0, background, false)
    screen:blit(mouse.x, mouse.y, mouse1)
    
    pad = Controls.read
    
    if pad:up() then
    mouse.y = mouse.y + 1
    end
    
    if pad:down() then
    mouse.y = mouse.y - 1
    end
    
    if pad:left() then
    mouse.x = mouse.x - 1
    end
    
    if pad:right() then
    mouse.x = mouse.x + 1
    end
    
    screen.waitVblankStart()
    screen:flip()
    end

    Didn't work.. every time i try to do something i get this error

    "attempt to index global 'mouse' <a nil value>"

    What does that mean?

  17. #1637
    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

    Ok umm, i need help making sounds play when i die...
    Code:
    ballsound = Sound.load("blip.wav", false)
    deathsound = Sound.load("magnum.wav", false)
    
    deathsound = death
    ballsound = ball
    voice = sound:play()
    i get "attempt to index global 'voice' (a nil value)"

    --XBL Gamertag: PhenoM904--

  18. #1638
    QJ Gamer Bronze
    Points: 5.975, Level: 50
    Level completed: 13%, Points required for next Level: 175
    Overall activity: 0%

    Registriert seit
    Oct 2005
    Ort
    Alabama
    Beiträge
    272
    Points
    5.975
    Level
    50
    Downloads
    0
    Uploads
    0

    Standard

    your sound variable isnt defined. nothing is assigned to it.
    Also what are "death" and "ball"?
    You already assigned ballsound and deathsound a value, so what are those that you are assigning directly after?
    Try something like this...

    Code:
    ballsound = Sound.load("blip.wav", false)
    deathsound = Sound.load("magnum.wav", false)
    
     local sound = deathsound
    voice = sound:play()
    My lua tutorials for PSP - www.evilmana.com/tutorials
    PSP Lua CodeBase - Add your own code examples to the codebase! - www.evilmana.com/tutorials/codebase/

  19. #1639
    Your Fate is Grim...
    Points: 11.640, Level: 70
    Level completed: 98%, Points required for next Level: 10
    Overall activity: 0%

    Registriert seit
    Oct 2005
    Beiträge
    2.269
    Points
    11.640
    Level
    70
    Downloads
    0
    Uploads
    0

    Standard

    Zitat Zitat von montrob
    Didn't work.. every time i try to do something i get this error

    "attempt to index global 'mouse' <a nil value>"

    What does that mean?
    oh, my bad. i figured it out.the correct code:


    Code:
    white = Color.new(255, 255, 255)
    
    background = Image.load("background.png")
    mouse = Image.load("mouse1.png")
    
    mousex = 100
    mousey = 172
    
    while true do
    
    screen:clear()
    
    pad = Controls.read()
    
    screen:blit(0, 0, background, false)
    screen:blit(mousex, mousey, mouse)
    
    if pad:up() then
    mousey = mousey - 1
    end
    
    if pad:down() then
    mousey = mousey + 1
    end
    
    if pad:left() then
    mousex = mousex - 1
    end
    
    if pad:right() then
    mousex = mousex + 1
    end
    
    screen.waitVblankStart()
    screen.flip()
    end
    the problems:

    1. the variable mouse.x and mouse.y both have periods in them. is LUA, that means that you are assigning those values to an array. EXAMPLE: if i had an array like this:

    Code:
    mouse = {}
    and then i put mouse.x = 100 and mouse.y= 170 in my code, and started it, the array would now look like this:

    Code:
    mouse = { x = 100, y = 170}
    BUT, you didnt have an array so it called it a "nil" value, and gave you an error. get what im saying??

    2. u had the variables BEFORE the loading. this is'nt so much a problem, but it could interfere with the coding. so ALWYS load everything first, THEN have the variables, THEN your main code.

    3. thisis just a tip: evertime you are blitting the same thing to the screen, NEVER put screen:flip() before each time you blit it. this will cause clipping problems. just put
    Code:
    screen.waitVblankStart()
    screen.flip()
    end
    at the VERY END of your code, IN the main loop.


    thats all i saw! hope u understood ur problems, and good luck with whatever ur doing!!

    EDIT: PSPMILLIONAIRE, could u help me with my collisions? read my above posts to see the problem i have. thx!
    Geändert von Grimfate126 (04-16-2006 um 03:58 PM Uhr)
    --------------------------------------------------------------------------------------

  20. #1640
    QJ Gamer Bronze
    Points: 5.975, Level: 50
    Level completed: 13%, Points required for next Level: 175
    Overall activity: 0%

    Registriert seit
    Oct 2005
    Ort
    Alabama
    Beiträge
    272
    Points
    5.975
    Level
    50
    Downloads
    0
    Uploads
    0

    Standard

    Grim you will have to use what is called "pixel perfect collision" .
    There are solutions for doing this posted all over the internet. Find an example with a simple BASIC language. It will be very much like lua.
    My lua tutorials for PSP - www.evilmana.com/tutorials
    PSP Lua CodeBase - Add your own code examples to the codebase! - www.evilmana.com/tutorials/codebase/

  21. #1641
    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

    Zitat Zitat von PSPMillionaire
    your sound variable isnt defined. nothing is assigned to it.
    Also what are "death" and "ball"?
    You already assigned ballsound and deathsound a value, so what are those that you are assigning directly after?
    Try something like this...

    Code:
    ballsound = Sound.load("blip.wav", false)
    deathsound = Sound.load("magnum.wav", false)
    
     local sound = deathsound
    voice = sound:play()
    I tried it... it freezes after the loading screen

    andi was a little confused by ur tuts on the ball and death thing
    Geändert von Mast3r_Shak3 (04-16-2006 um 04:14 PM Uhr)

    --XBL Gamertag: PhenoM904--

  22. #1642
    QJ Gamer Silver
    Points: 9.678, Level: 66
    Level completed: 7%, Points required for next Level: 372
    Overall activity: 0%

    Registriert seit
    Jun 2005
    Ort
    The Migrant Fleet
    Beiträge
    908
    Points
    9.678
    Level
    66
    Downloads
    0
    Uploads
    0

    Standard

    Ya i get what your sayin now.. But now it says

    "attempt to index a global 'pad' <a function value>

  23. #1643
    Your Fate is Grim...
    Points: 11.640, Level: 70
    Level completed: 98%, Points required for next Level: 10
    Overall activity: 0%

    Registriert seit
    Oct 2005
    Beiträge
    2.269
    Points
    11.640
    Level
    70
    Downloads
    0
    Uploads
    0

    Standard

    Zitat Zitat von montrob
    Ya i get what your sayin now.. But now it says

    "attempt to index a global 'pad' <a function value>
    oh whoops(again), here is the fixed code:

    Code:
    white = Color.new(255, 255, 255)
    
    background = Image.load("background.png")
    mouse = Image.load("mouse1.png")
    
    mousex = 100
    mousey = 172
    
    while true do
    
    screen:clear()
    
    pad = Controls.read()
    
    screen:blit(0, 0, background, false)
    screen:blit(mousex, mousey, mouse)
    
    if pad:up() then
    mousey = mousey - 1
    end
    
    if pad:down() then
    mousey = mousey + 1
    end
    
    if pad:left() then
    mousex = mousex - 1
    end
    
    if pad:right() then
    mousex = mousex + 1
    end
    
    screen.waitVblankStart()
    screen.flip()
    end
    and if it gives u another error, tell me what line its on, but this exact code worked for me.
    --------------------------------------------------------------------------------------

  24. #1644
    QJ Gamer Silver
    Points: 9.678, Level: 66
    Level completed: 7%, Points required for next Level: 372
    Overall activity: 0%

    Registriert seit
    Jun 2005
    Ort
    The Migrant Fleet
    Beiträge
    908
    Points
    9.678
    Level
    66
    Downloads
    0
    Uploads
    0

    Standard

    ok thx now i can move on

  25. #1645
    Your Fate is Grim...
    Points: 11.640, Level: 70
    Level completed: 98%, Points required for next Level: 10
    Overall activity: 0%

    Registriert seit
    Oct 2005
    Beiträge
    2.269
    Points
    11.640
    Level
    70
    Downloads
    0
    Uploads
    0

    Standard

    Zitat Zitat von montrob
    ok thx now i can move on
    what u working on?
    --------------------------------------------------------------------------------------

  26. #1646
    QJ Gamer Silver
    Points: 9.678, Level: 66
    Level completed: 7%, Points required for next Level: 372
    Overall activity: 0%

    Registriert seit
    Jun 2005
    Ort
    The Migrant Fleet
    Beiträge
    908
    Points
    9.678
    Level
    66
    Downloads
    0
    Uploads
    0

    Standard

    Zitat Zitat von Grimfate126
    what u working on?
    I'll tell you once i get a little bit further..

    As for now.. what do you put for the word "AND" like this:

    Code:
    if mousex == 135 "AND" -- what would you put there?
    if mousey == 151

  27. #1647
    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

    What you mean like if pad:down() and pad:up() then?

    if mousex == 135 and mousey == 151 then

  28. #1648
    QJ Gamer Silver
    Points: 9.678, Level: 66
    Level completed: 7%, Points required for next Level: 372
    Overall activity: 0%

    Registriert seit
    Jun 2005
    Ort
    The Migrant Fleet
    Beiträge
    908
    Points
    9.678
    Level
    66
    Downloads
    0
    Uploads
    0

    Standard

    oh.. thx lol

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

    I got this error:

    'end' expected <to close 'while' at line 10> near '<eof>'

  30. #1650
    QJ Gamer Silver
    Points: 9.678, Level: 66
    Level completed: 7%, Points required for next Level: 372
    Overall activity: 0%

    Registriert seit
    Jun 2005
    Ort
    The Migrant Fleet
    Beiträge
    908
    Points
    9.678
    Level
    66
    Downloads
    0
    Uploads
    0

    Standard

    add an end at the end of your while statment


 

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 08:59 PM Uhr.

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