Seite 2 von 342 ErsteErste 1 2 3 4 5 6 7 8 9 10 11 12 52 102 ... LetzteLetzte
Zeige Ergebnis 31 bis 60 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; Zitat von MagicianFB http://www.lua.org/pil/index.html#P3 http://luaplayer.org/functions.txt k thanx...

  
  1. #31
    Rock Star
    Points: 70.899, Level: 100
    Level completed: 0%, Points required for next Level: 0
    Overall activity: 0%

    Registriert seit
    Aug 2005
    Ort
    CT| FW: 4.01 M33-2
    Beiträge
    11.844
    Points
    70.899
    Level
    100
    Downloads
    0
    Uploads
    0

    Standard

    k thanx




  2. #32
    Developer
    Points: 10.075, Level: 67
    Level completed: 7%, Points required for next Level: 375
    Overall activity: 0%

    Registriert seit
    Sep 2005
    Ort
    Sweden
    Beiträge
    941
    Points
    10.075
    Level
    67
    Downloads
    0
    Uploads
    0

    Standard

    In Lua tutorial 2 you can display pic's when you push a button. But how do I do so the image doesn't disapear directly after a stop pushing the button??I want the picture/text to stay there.

    And how do I change the size of the text/numers in my program??

    Thanks in advance!

  3. #33
    Rock Star
    Points: 70.899, Level: 100
    Level completed: 0%, Points required for next Level: 0
    Overall activity: 0%

    Registriert seit
    Aug 2005
    Ort
    CT| FW: 4.01 M33-2
    Beiträge
    11.844
    Points
    70.899
    Level
    100
    Downloads
    0
    Uploads
    0

    Standard

    can u post ur code??


  4. #34
    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 HELP (Please)

    Hi i really need some help here.
    My new game Dragon Ball Portable is very dodgy.
    It skatter's around.
    Is the code alright?
    (Please nobody steal this)
    How can i get the Picture to move up aswell???
    Code:
    --c5cha7's DBP (Beta source)
    --activate usb
    System.usbDiskModeActivate()
    
    --load text colors
    red = Color.new(255, 0, 0)
    blue = Color.new(0, 0, 255)
    green = Color.new(0, 255, 0)
    black = Color.new(0, 0, 0)
    white = Color.new(255, 255, 255)
    
    --Startup
    intro = Sound.load("Data/Sounds/intro.wav")
    luaplayer = Image.load("Data/images/lua.png")
    intro:play()
    screen:blit(0, 0,  luaplayer)
    screen.flip(120)
    screen.waitVblankStart(120)
    
    -- Move Player
    
    function move() 
    local limit = -11 -- adjust the count limit as needed 
    local pad = Controls.read() 
    
    if (pad ~= oldpad) or (countpads > limit) then 
    
    if pad:right() then 
    playerPos = playerPos + 1 
    if playerPos > 13 then playerPos = 13 end 
    screen.waitVblankStart(2)
    end 
    
    if pad:left() then 
    playerPos = playerPos - 1 
    if playerPos < 0 then playerPos = 0 end 
    screen.waitVblankStart(2)
    end 
    
    if pad:up() then 
    playerPos = playerPos - 1 
    if playerPos < 1 then playerPos = 1 end 
    end 
    
    if pad == oldpad then 
    countpads = limit - 1 -- for repeatedly advanced 
    else 
    countpads = 0 -- for the first pressed 
    end 
    oldpad = pad 
    else -- do nothing for a moment 
    countpads = countpads + 1 
    screen.waitVblankStart(5)
    screen.waitVblankStart(4)
    screen.waitVblankStart(1)
    end 
    
    end 
    
    player = Image.load "player.png" 
    playerPos = 1 
    countpads = 0 
    
    while true do 
    screen:clear() 
    move() 
    screen:blit(32*playerPos, 120, player) 
    screen.waitVblankStart() 
    screen:flip() 
    end
    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!

  5. #35
    Developer
    Points: 10.075, Level: 67
    Level completed: 7%, Points required for next Level: 375
    Overall activity: 0%

    Registriert seit
    Sep 2005
    Ort
    Sweden
    Beiträge
    941
    Points
    10.075
    Level
    67
    Downloads
    0
    Uploads
    0

    Standard

    Sorry I forgot to post the code Here it is:
    Code:
    System.usbDiskModeActivate()
    
    blue = Color.new(0, 0, 255)
    orange = Color.new(223, 88, 6)
    grey = Color.new(94, 97, 111)
    yellow = Color.new(255, 255, 0)
    black = Color.new(0, 0, 0)
    white = Color.new(255, 255, 255)
    
    x = 96
    y = 96
    speed = 3
    
    while true do
    screen:clear()
    
    pad = Controls.read()
    
    screen:print(x, y, "+", white)
    
    if pad:select() then screen:save("screenshot.tga") end
    
    if pad:start() then
    		break
    	end
    
    if pad:analogX() < -30 then
    x = x - speed
    end
    
    if pad:analogX() > 30 then
    x = x + speed
    end
    
    if pad:analogY() < -30 then
    y = y - speed
    end
    
    if pad:analogY() > 30 then
    y = y + speed
    end
    
       if pad:left() then
          x = x - 3
       end
    
       if pad:right() then
          x = x + 3
       end
    
       if pad:up() then
          y = y - 3
       end
    
       if pad:down() then
          y = y + 3
       end
    
       if pad:start() then
    		break
    	end
    
    if pad:cross() then
    screen:print(20, 18, "1", white)
    end
    
    screen.waitVblankStart()
    screen.flip()
    
    end

  6. #36
    QJ Gamer Blue
    Points: 4.648, Level: 43
    Level completed: 49%, Points required for next Level: 102
    Overall activity: 0%

    Registriert seit
    Sep 2005
    Ort
    In your garage
    Beiträge
    73
    Points
    4.648
    Level
    43
    Downloads
    0
    Uploads
    0

    Standard

    What are the sound limitations in lua?..

    I've been trying to make some background music, but what should it be in?

    I've got various wavs playing on events but they fail to play when I try to start them at the main menu. I just want some background music.

    Cheers.

  7. #37
    NDS Mod
    Points: 18.386, Level: 86
    Level completed: 8%, Points required for next Level: 464
    Overall activity: 0%

    Registriert seit
    Jul 2005
    Ort
    w00+land
    Beiträge
    645
    Points
    18.386
    Level
    86
    Downloads
    0
    Uploads
    0

    Standard

    Zitat Zitat von Bilo
    What are the sound limitations in lua?..

    I've been trying to make some background music, but what should it be in?

    I've got various wavs playing on events but they fail to play when I try to start them at the main menu. I just want some background music.

    Cheers.
    They can only be wavs.
    "15% percent of programing is creating a program, 85% percent is getting it to work like it should." - Me
    [URL=http://www.mozilla.org/products/firefox/][IMG]http://img439.imageshack.us/img439/5667/getfirefox0sr.png[/IMG][/URL]

  8. #38
    QJ Gamer Blue
    Points: 4.648, Level: 43
    Level completed: 49%, Points required for next Level: 102
    Overall activity: 0%

    Registriert seit
    Sep 2005
    Ort
    In your garage
    Beiträge
    73
    Points
    4.648
    Level
    43
    Downloads
    0
    Uploads
    0

    Standard

    Well in that case, there is something wrong as the background audio I have wont play and it's a wav.

  9. #39
    NDS Mod
    Points: 18.386, Level: 86
    Level completed: 8%, Points required for next Level: 464
    Overall activity: 0%

    Registriert seit
    Jul 2005
    Ort
    w00+land
    Beiträge
    645
    Points
    18.386
    Level
    86
    Downloads
    0
    Uploads
    0

    Standard

    Zitat Zitat von Bilo
    Well in that case, there is something wrong as the background audio I have wont play and it's a wav.
    Post your script.
    "15% percent of programing is creating a program, 85% percent is getting it to work like it should." - Me
    [URL=http://www.mozilla.org/products/firefox/][IMG]http://img439.imageshack.us/img439/5667/getfirefox0sr.png[/IMG][/URL]

  10. #40
    Developer
    Points: 10.075, Level: 67
    Level completed: 7%, Points required for next Level: 375
    Overall activity: 0%

    Registriert seit
    Sep 2005
    Ort
    Sweden
    Beiträge
    941
    Points
    10.075
    Level
    67
    Downloads
    0
    Uploads
    0

    Standard

    Anyone who can help me with my qustion above??

  11. #41
    NDS Mod
    Points: 18.386, Level: 86
    Level completed: 8%, Points required for next Level: 464
    Overall activity: 0%

    Registriert seit
    Jul 2005
    Ort
    w00+land
    Beiträge
    645
    Points
    18.386
    Level
    86
    Downloads
    0
    Uploads
    0

    Standard

    Zitat Zitat von SodR
    Anyone who can help me with my qustion above??
    Put the print flip and clear in the if's for the buttons to conrol position.
    "15% percent of programing is creating a program, 85% percent is getting it to work like it should." - Me
    [URL=http://www.mozilla.org/products/firefox/][IMG]http://img439.imageshack.us/img439/5667/getfirefox0sr.png[/IMG][/URL]

  12. #42
    QJ Gamer Blue
    Points: 4.648, Level: 43
    Level completed: 49%, Points required for next Level: 102
    Overall activity: 0%

    Registriert seit
    Sep 2005
    Ort
    In your garage
    Beiträge
    73
    Points
    4.648
    Level
    43
    Downloads
    0
    Uploads
    0

    Standard

    Script at start -

    sensiblesnd= Sound.load("sensible.wav" )

    script to initiate sound -

    sensiblesndlay()
    Geändert von Bilo (10-04-2005 um 11:45 AM Uhr)

  13. #43
    Developer
    Points: 10.075, Level: 67
    Level completed: 7%, Points required for next Level: 375
    Overall activity: 0%

    Registriert seit
    Sep 2005
    Ort
    Sweden
    Beiträge
    941
    Points
    10.075
    Level
    67
    Downloads
    0
    Uploads
    0

    Standard

    Zitat Zitat von MagicianFB
    Put the print flip and clear in the if's for the buttons to conrol position.
    Could you write an example please? I doesn't exactly undrstand what you mean.

  14. #44
    NDS Mod
    Points: 18.386, Level: 86
    Level completed: 8%, Points required for next Level: 464
    Overall activity: 0%

    Registriert seit
    Jul 2005
    Ort
    w00+land
    Beiträge
    645
    Points
    18.386
    Level
    86
    Downloads
    0
    Uploads
    0

    Standard

    Zitat Zitat von Bilo
    Script at start -

    sensiblesnd= Sound.load("sensible.wav" )

    script to initiate sound -

    sensiblesndlay()
    I don't now, that should work.
    "15% percent of programing is creating a program, 85% percent is getting it to work like it should." - Me
    [URL=http://www.mozilla.org/products/firefox/][IMG]http://img439.imageshack.us/img439/5667/getfirefox0sr.png[/IMG][/URL]

  15. #45
    QJ Gamer Blue
    Points: 4.648, Level: 43
    Level completed: 49%, Points required for next Level: 102
    Overall activity: 0%

    Registriert seit
    Sep 2005
    Ort
    In your garage
    Beiträge
    73
    Points
    4.648
    Level
    43
    Downloads
    0
    Uploads
    0

    Standard

    Hmm.. must be the sound file as if I replace one of my other sounds with it, then that sound fails to initiate too.

  16. #46
    QJ Gamer Blue
    Points: 4.995, Level: 45
    Level completed: 23%, Points required for next Level: 155
    Overall activity: 0%

    Registriert seit
    Sep 2005
    Beiträge
    122
    Points
    4.995
    Level
    45
    Downloads
    0
    Uploads
    0

    Standard

    I'm having fat-as problem with this really simple thing. But im a noob so...=)
    anyway how can I make it so that the program can "back" one screen so that I for instance after pressing a button can go back to the titelscreen?

  17. #47
    QJ Gamer Blue
    Points: 4.648, Level: 43
    Level completed: 49%, Points required for next Level: 102
    Overall activity: 0%

    Registriert seit
    Sep 2005
    Ort
    In your garage
    Beiträge
    73
    Points
    4.648
    Level
    43
    Downloads
    0
    Uploads
    0

    Standard

    um...

    if pad:triangle() then
    mainmanu()
    end

    Something like that, main menu being a function previously set.

  18. #48
    Advanced PSP Coder
    Points: 7.141, Level: 55
    Level completed: 96%, Points required for next Level: 9
    Overall activity: 0%

    Registriert seit
    Oct 2005
    Ort
    Down South
    Beiträge
    426
    Points
    7.141
    Level
    55
    Downloads
    0
    Uploads
    0

    Standard

    Can anyone post an example using a function such as the main menu? Thanks so much.
    [center][COLOR=Green][B]- PM Me if you need help with anything - [/B] [/COLOR]

    [B][SIZE=3][COLOR=DarkOrange][U]Homebrew I've Made[/U][/COLOR][/SIZE][/B]

    [B]Applications:
    [URL=http://files.pspupdates.qj.net/cgi-bin/cfiles.cgi?0,0,0,0,17,1667]PSP Alarm v0.5[/URL] [/b]

    [B]Games:
    [URL=http://files.pspupdates.qj.net/cgi-bin/cfiles.cgi?0,0,0,0,12,1669] Virtual Escape DEMO[/URL] [w/ Lancer]
    [URL=http://files.pspupdates.qj.net/cgi-bin/cfiles.cgi?0,0,0,0,12,1577]PSP Dodge v1.0[/URL][/b]

    [img]http://img517.imageshack.us/img517/4735/sig3qu.jpg[/img][/center]

  19. #49
    Developer
    Points: 8.545, Level: 62
    Level completed: 32%, Points required for next Level: 205
    Overall activity: 0%

    Registriert seit
    Aug 2005
    Beiträge
    472
    Points
    8.545
    Level
    62
    Downloads
    0
    Uploads
    0

    Standard

    well im working on something extremely minor, but it wont load. I keep getting an error.

    ..........

    I got it up and running
    Geändert von cools (10-06-2005 um 12:56 PM Uhr)

    PSP Monopoly | PSP Tic Tac Toe | PSP eMail and SMS | Drag Mini | Block Dude
    http://www.cools.biaklan.com
    Currently Working on ?????

    Quote of the Week

  20. #50
    QJ Gamer Blue
    Points: 4.648, Level: 43
    Level completed: 49%, Points required for next Level: 102
    Overall activity: 0%

    Registriert seit
    Sep 2005
    Ort
    In your garage
    Beiträge
    73
    Points
    4.648
    Level
    43
    Downloads
    0
    Uploads
    0

    Standard

    screen:blit(=210, 1, "monopoly")

    that should be

    screen:blit(210, 1, monopoly)

  21. #51
    NDS Mod
    Points: 18.386, Level: 86
    Level completed: 8%, Points required for next Level: 464
    Overall activity: 0%

    Registriert seit
    Jul 2005
    Ort
    w00+land
    Beiträge
    645
    Points
    18.386
    Level
    86
    Downloads
    0
    Uploads
    0

    Standard

    Zitat Zitat von cools
    well im working on something extremely minor, but it wont load. I keep getting an error.

    Code:
    System.usbDiskModeActivate()
    black = Color.new(0, 0, 0)
    monopoly = Image.load("monopolyboard2.png")
    screen:blit(=210, 1, "monopoly")
    screen:flip()
    screen:print(272, 1, "Monopoly Board", black)
    screen.flip()
    while true do
    screen.waitVblankStart()
    end
    There's an unnecessary "=" when you blit the image.
    "15% percent of programing is creating a program, 85% percent is getting it to work like it should." - Me
    [URL=http://www.mozilla.org/products/firefox/][IMG]http://img439.imageshack.us/img439/5667/getfirefox0sr.png[/IMG][/URL]

  22. #52
    Developer
    Points: 8.545, Level: 62
    Level completed: 32%, Points required for next Level: 205
    Overall activity: 0%

    Registriert seit
    Aug 2005
    Beiträge
    472
    Points
    8.545
    Level
    62
    Downloads
    0
    Uploads
    0

    Standard

    Bilo screen:blit(=210, 1, "monopoly")

    that should be

    screen:blit(210, 1, monopoly)
    I tried that and i got

    error: index.lua:4: bad argument #2 to 'blit' (Image expected, got s
    tring)

    PSP Monopoly | PSP Tic Tac Toe | PSP eMail and SMS | Drag Mini | Block Dude
    http://www.cools.biaklan.com
    Currently Working on ?????

    Quote of the Week

  23. #53
    NDS Mod
    Points: 18.386, Level: 86
    Level completed: 8%, Points required for next Level: 464
    Overall activity: 0%

    Registriert seit
    Jul 2005
    Ort
    w00+land
    Beiträge
    645
    Points
    18.386
    Level
    86
    Downloads
    0
    Uploads
    0

    Standard

    Zitat Zitat von cools
    I tried that and i got

    error: index.lua:4: bad argument #2 to 'blit' (Image expected, got s
    tring)
    monopoly shouldn't be in quotes.
    "15% percent of programing is creating a program, 85% percent is getting it to work like it should." - Me
    [URL=http://www.mozilla.org/products/firefox/][IMG]http://img439.imageshack.us/img439/5667/getfirefox0sr.png[/IMG][/URL]

  24. #54
    Developer
    Points: 8.545, Level: 62
    Level completed: 32%, Points required for next Level: 205
    Overall activity: 0%

    Registriert seit
    Aug 2005
    Beiträge
    472
    Points
    8.545
    Level
    62
    Downloads
    0
    Uploads
    0

    Standard

    Thank You I have finally got it to load where I want IT!!!

    PSP Monopoly | PSP Tic Tac Toe | PSP eMail and SMS | Drag Mini | Block Dude
    http://www.cools.biaklan.com
    Currently Working on ?????

    Quote of the Week

  25. #55
    QJ Gamer Blue
    Points: 4.648, Level: 43
    Level completed: 49%, Points required for next Level: 102
    Overall activity: 0%

    Registriert seit
    Sep 2005
    Ort
    In your garage
    Beiträge
    73
    Points
    4.648
    Level
    43
    Downloads
    0
    Uploads
    0

    Standard

    Zitat Zitat von cools
    I tried that and i got

    error: index.lua:4: bad argument #2 to 'blit' (Image expected, got s
    tring)
    I said it shouldn't be in quotes.

    If you look at what I posted.

  26. #56
    Developer
    Points: 8.545, Level: 62
    Level completed: 32%, Points required for next Level: 205
    Overall activity: 0%

    Registriert seit
    Aug 2005
    Beiträge
    472
    Points
    8.545
    Level
    62
    Downloads
    0
    Uploads
    0

    Standard

    im sorry that is my mistake...

    PSP Monopoly | PSP Tic Tac Toe | PSP eMail and SMS | Drag Mini | Block Dude
    http://www.cools.biaklan.com
    Currently Working on ?????

    Quote of the Week

  27. #57
    QJ Gamer Blue
    Points: 4.648, Level: 43
    Level completed: 49%, Points required for next Level: 102
    Overall activity: 0%

    Registriert seit
    Sep 2005
    Ort
    In your garage
    Beiträge
    73
    Points
    4.648
    Level
    43
    Downloads
    0
    Uploads
    0

    Standard

    lol, it's alright mate, don't be sorry :)

    Hope your scriptin's going well :)

  28. #58
    Advanced PSP Coder
    Points: 7.141, Level: 55
    Level completed: 96%, Points required for next Level: 9
    Overall activity: 0%

    Registriert seit
    Oct 2005
    Ort
    Down South
    Beiträge
    426
    Points
    7.141
    Level
    55
    Downloads
    0
    Uploads
    0

    Standard

    Can anyone explain how to make a Lua program availible to boot outside Lua? Like with an ebbot, so its in the list of games on the Memory Stick? Thanks!
    [center][COLOR=Green][B]- PM Me if you need help with anything - [/B] [/COLOR]

    [B][SIZE=3][COLOR=DarkOrange][U]Homebrew I've Made[/U][/COLOR][/SIZE][/B]

    [B]Applications:
    [URL=http://files.pspupdates.qj.net/cgi-bin/cfiles.cgi?0,0,0,0,17,1667]PSP Alarm v0.5[/URL] [/b]

    [B]Games:
    [URL=http://files.pspupdates.qj.net/cgi-bin/cfiles.cgi?0,0,0,0,12,1669] Virtual Escape DEMO[/URL] [w/ Lancer]
    [URL=http://files.pspupdates.qj.net/cgi-bin/cfiles.cgi?0,0,0,0,12,1577]PSP Dodge v1.0[/URL][/b]

    [img]http://img517.imageshack.us/img517/4735/sig3qu.jpg[/img][/center]

  29. #59
    QJ Gamer Blue
    Points: 4.648, Level: 43
    Level completed: 49%, Points required for next Level: 102
    Overall activity: 0%

    Registriert seit
    Sep 2005
    Ort
    In your garage
    Beiträge
    73
    Points
    4.648
    Level
    43
    Downloads
    0
    Uploads
    0

    Standard

    Pull the eboot's from another lua app.

    Then edit the eboot in the (%) folder to change the icon/name.

    Thats it.

    There's probably a different way but this way works.
    Geändert von Bilo (10-04-2005 um 04:30 PM Uhr)

  30. #60
    NDS Mod
    Points: 18.386, Level: 86
    Level completed: 8%, Points required for next Level: 464
    Overall activity: 0%

    Registriert seit
    Jul 2005
    Ort
    w00+land
    Beiträge
    645
    Points
    18.386
    Level
    86
    Downloads
    0
    Uploads
    0

    Standard

    Zitat Zitat von Virtue
    Can anyone explain how to make a Lua program availible to boot outside Lua? Like with an ebbot, so its in the list of games on the Memory Stick? Thanks!
    Do you mean like Lowser?
    "15% percent of programing is creating a program, 85% percent is getting it to work like it should." - Me
    [URL=http://www.mozilla.org/products/firefox/][IMG]http://img439.imageshack.us/img439/5667/getfirefox0sr.png[/IMG][/URL]


 
Seite 2 von 342 ErsteErste 1 2 3 4 5 6 7 8 9 10 11 12 52 102 ... LetzteLetzte

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

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