Seite 134 von 342 ErsteErste ... 34 84 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 184 234 ... LetzteLetzte
Zeige Ergebnis 3.991 bis 4.020 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; what is the code to exit back to luaplayer...

  
  1. #3991
    Designs
    Points: 14.040, Level: 76
    Level completed: 98%, Points required for next Level: 10
    Overall activity: 0%

    Registriert seit
    Jul 2006
    Ort
    Canada
    Beiträge
    1.395
    Points
    14.040
    Level
    76
    Downloads
    0
    Uploads
    0

    Standard

    what is the code to exit back to luaplayer



  2. #3992
    QJ Gamer Gold
    Points: 11.629, Level: 70
    Level completed: 95%, Points required for next Level: 21
    Overall activity: 0%

    Registriert seit
    Aug 2006
    Beiträge
    1.633
    Points
    11.629
    Level
    70
    Downloads
    0
    Uploads
    0

    Standard

    Thisll make it exit back to luaplayer when you place it in your main loop and press start:

    if pad:start() then
    break
    end

    Also you must be in your index.lua for that to work, not in a game.lua or other already dofiled file.

  3. #3993
    QJ Gamer Blue
    Points: 6.041, Level: 50
    Level completed: 46%, Points required for next Level: 109
    Overall activity: 0%

    Registriert seit
    Aug 2006
    Ort
    Missouri
    Beiträge
    451
    Points
    6.041
    Level
    50
    Downloads
    0
    Uploads
    0

    Standard

    Zitat Zitat von -TacticalPaper-
    Thisll make it exit back to luaplayer when you place it in your main loop and press start:

    if pad:start() then
    break
    end

    Also you must be in your index.lua for that to work, not in a game.lua or other already dofiled file.
    that gives a NULL error. and if its above the loop it says no loop to break end

  4. #3994
    QJ Gamer Gold
    Points: 11.629, Level: 70
    Level completed: 95%, Points required for next Level: 21
    Overall activity: 0%

    Registriert seit
    Aug 2006
    Beiträge
    1.633
    Points
    11.629
    Level
    70
    Downloads
    0
    Uploads
    0

    Standard

    It has to be in your loop because its BREAKing your loop. And all you need to do is between the last bit of your code and screen.waitVblankStart() screen.flip() end add in:
    if pad:start() then
    break
    end

    If it gives you a null then it means you havent defined pad = Controls.read()

  5. #3995
    QJ Gamer Blue
    Points: 6.041, Level: 50
    Level completed: 46%, Points required for next Level: 109
    Overall activity: 0%

    Registriert seit
    Aug 2006
    Ort
    Missouri
    Beiträge
    451
    Points
    6.041
    Level
    50
    Downloads
    0
    Uploads
    0

    Standard

    that works, thanks :)

  6. #3996
    QJ Gamer Gold
    Points: 11.629, Level: 70
    Level completed: 95%, Points required for next Level: 21
    Overall activity: 0%

    Registriert seit
    Aug 2006
    Beiträge
    1.633
    Points
    11.629
    Level
    70
    Downloads
    0
    Uploads
    0

    Standard

    Youre welcome

  7. #3997
    QJ Gamer Blue
    Points: 6.041, Level: 50
    Level completed: 46%, Points required for next Level: 109
    Overall activity: 0%

    Registriert seit
    Aug 2006
    Ort
    Missouri
    Beiträge
    451
    Points
    6.041
    Level
    50
    Downloads
    0
    Uploads
    0

    Standard

    ok. it says null still and after about 1 or 2 seconds it will reset. is there any way to keep it from sayin that.

    System.usbDiskModeActivat e()
    white = Color.new(255,255,255)
    menuBackground = Image.load("menuBackgroun d.png")
    while true do
    pad = Controls.read()
    screen:blit(0,0,menuBackg round)
    screen.flip()
    screen.waitVblankStart()
    if pad:start() then
    break
    end
    end

  8. #3998
    QJ Gamer Silver
    Points: 10.921, Level: 69
    Level completed: 18%, Points required for next Level: 329
    Overall activity: 0%

    Registriert seit
    May 2006
    Ort
    Behind you.
    Beiträge
    1.814
    Points
    10.921
    Level
    69
    Downloads
    0
    Uploads
    0

    Standard

    Zitat Zitat von Cheez Pirate
    ok. it says null still and after about 1 or 2 seconds it will reset. is there any way to keep it from sayin that.

    System.usbDiskModeActivat e()
    white = Color.new(255,255,255)
    menuBackground = Image.load("menuBackgroun d.png")
    while true do
    pad = Controls.read()
    screen:blit(0,0,menuBackg round)
    screen.flip()
    screen.waitVblankStart()
    if pad:start() then
    break
    end
    end

    Try changing your code to this:

    Code:
    System.usbDiskModeActivate()
    
    white = Color.new(255,255,255)
    menuBackground = Image.load("menuBackground.png")
    
    while true do
    screen:blit(0,0,menuBackground, false)
    pad = Controls.read()
    if pad:start() then
    break
    end
    
    screen.waitVblankStart()
    screen.flip()
    end

  9. #3999
    QJ Gamer Gold
    Points: 11.629, Level: 70
    Level completed: 95%, Points required for next Level: 21
    Overall activity: 0%

    Registriert seit
    Aug 2006
    Beiträge
    1.633
    Points
    11.629
    Level
    70
    Downloads
    0
    Uploads
    0

    Standard

    Yea you need to put it before the watvblank and flip. Nothing should go between screen.waitVblankStart() screen.flip() and end except for variable concerning stuff like oldpad = pad.

  10. #4000
    I'm Baaaack!
    Points: 17.067, Level: 83
    Level completed: 44%, Points required for next Level: 283
    Overall activity: 52,0%

    Registriert seit
    May 2006
    Ort
    Nowhere
    Beiträge
    2.186
    Points
    17.067
    Level
    83
    Downloads
    0
    Uploads
    0

    Standard

    Yayy, I got the 4000th post in this thread. Yayy.

  11. #4001
    QJ Gamer Gold
    Points: 11.629, Level: 70
    Level completed: 95%, Points required for next Level: 21
    Overall activity: 0%

    Registriert seit
    Aug 2006
    Beiträge
    1.633
    Points
    11.629
    Level
    70
    Downloads
    0
    Uploads
    0

    Standard

    And I got the postsbefore and after 4000. Ok im gonna stop before i get in trouble for spamming.

    And thus is the post that by the board view is # 4000.

  12. #4002
    Banned for LIFE
    Points: 18.744, Level: 86
    Level completed: 79%, Points required for next Level: 106
    Overall activity: 0%

    Registriert seit
    Oct 2006
    Ort
    East London, England
    Beiträge
    2
    Points
    18.744
    Level
    86
    Downloads
    0
    Uploads
    0

    Standard

    I wanna try and incorporate a small little animation to my charcter in my lua app . How would i go about saying when pad is held on left and then play the animation ?

  13. #4003
    QJ Gamer Platinum
    Points: 57.528, Level: 100
    Level completed: 0%, Points required for next Level: 0
    Overall activity: 0%

    Registriert seit
    Dec 2005
    Ort
    h0000000rj
    Beiträge
    12.867
    Points
    57.528
    Level
    100
    Downloads
    0
    Uploads
    0

    Standard

    What?
    [I fail @ life]

  14. #4004
    Banned for LIFE
    Points: 18.744, Level: 86
    Level completed: 79%, Points required for next Level: 106
    Overall activity: 0%

    Registriert seit
    Oct 2006
    Ort
    East London, England
    Beiträge
    2
    Points
    18.744
    Level
    86
    Downloads
    0
    Uploads
    0

    Standard

    I want my player to do a certain action when i double tap left on the d-pad. How would i go about doing this ?

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

    Set a tick count or timer in the game, get the current tick count or value of the timer when you first tap left, then get it again when you tap left again. Check the difference of the values and if it is less then a certain value, perform the action.

    Also you have to be able to detect the difference between a tap and when a direction is held down.

  16. #4006
    Designs
    Points: 14.040, Level: 76
    Level completed: 98%, Points required for next Level: 10
    Overall activity: 0%

    Registriert seit
    Jul 2006
    Ort
    Canada
    Beiträge
    1.395
    Points
    14.040
    Level
    76
    Downloads
    0
    Uploads
    0

    Standard

    how could i implement a keyboard into my app

  17. #4007
    I'm Baaaack!
    Points: 17.067, Level: 83
    Level completed: 44%, Points required for next Level: 283
    Overall activity: 52,0%

    Registriert seit
    May 2006
    Ort
    Nowhere
    Beiträge
    2.186
    Points
    17.067
    Level
    83
    Downloads
    0
    Uploads
    0

    Standard

    Zitat Zitat von yoyomacy
    how could i implement a keyboard into my app
    There's a pre-made keyboard in the download section. I think it's called Danzeff's OSK or something.

  18. #4008
    Designs
    Points: 14.040, Level: 76
    Level completed: 98%, Points required for next Level: 10
    Overall activity: 0%

    Registriert seit
    Jul 2006
    Ort
    Canada
    Beiträge
    1.395
    Points
    14.040
    Level
    76
    Downloads
    0
    Uploads
    0

    Standard

    but thats for C i was just looking at that

  19. #4009
    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

    Zitat Zitat von yoyomacy
    but thats for C i was just looking at that
    I haven't checked this out, but it says it's for Lua: http://ps2dev.org/news/Danzeff_keybo...PSP_Lua_Player


  20. #4010
    Designs
    Points: 14.040, Level: 76
    Level completed: 98%, Points required for next Level: 10
    Overall activity: 0%

    Registriert seit
    Jul 2006
    Ort
    Canada
    Beiträge
    1.395
    Points
    14.040
    Level
    76
    Downloads
    0
    Uploads
    0

    Standard

    oh sweet, there are 2 versions, C and LUA, thats cool, if anyone knows how to actually put it in my app please tell

  21. #4011
    I'm Baaaack!
    Points: 17.067, Level: 83
    Level completed: 44%, Points required for next Level: 283
    Overall activity: 52,0%

    Registriert seit
    May 2006
    Ort
    Nowhere
    Beiträge
    2.186
    Points
    17.067
    Level
    83
    Downloads
    0
    Uploads
    0

    Standard

    Zitat Zitat von yoyomacy
    oh sweet, there are 2 versions, C and LUA, thats cool, if anyone knows how to actually put it in my app please tell
    Being as experienced as you say you are, you should be able to do that. At least with help from the instructions.

  22. #4012
    Designs
    Points: 14.040, Level: 76
    Level completed: 98%, Points required for next Level: 10
    Overall activity: 0%

    Registriert seit
    Jul 2006
    Ort
    Canada
    Beiträge
    1.395
    Points
    14.040
    Level
    76
    Downloads
    0
    Uploads
    0

    Standard

    Zitat Zitat von Access_Denied
    Being as experienced as you say you are, you should be able to do that. At least with help from the instructions.
    i did it word for word and it didnt work

    anyone?

    nobody?
    -= Double Post =-
    someone must know this
    Geändert von yoyomacy (11-09-2006 um 07:34 PM Uhr) Grund: Automerged Doublepost

  23. #4013
    QJ Gamer Platinum
    Points: 57.528, Level: 100
    Level completed: 0%, Points required for next Level: 0
    Overall activity: 0%

    Registriert seit
    Dec 2005
    Ort
    h0000000rj
    Beiträge
    12.867
    Points
    57.528
    Level
    100
    Downloads
    0
    Uploads
    0

    Standard

    ... yoyomacy? experienced? lol. He told me he's been programming for less than two weeks now.
    [I fail @ life]

  24. #4014
    I'm Baaaack!
    Points: 17.067, Level: 83
    Level completed: 44%, Points required for next Level: 283
    Overall activity: 52,0%

    Registriert seit
    May 2006
    Ort
    Nowhere
    Beiträge
    2.186
    Points
    17.067
    Level
    83
    Downloads
    0
    Uploads
    0

    Standard

    Zitat Zitat von FreePlay
    ... yoyomacy? experienced? lol. He told me he's been programming for less than two weeks now.
    Well, I thought he had enough experience. After all, he made Text2Phone and fBrowser.

  25. #4015
    QJ Gamer Bronze
    Points: 9.316, Level: 64
    Level completed: 89%, Points required for next Level: 34
    Overall activity: 0%

    Registriert seit
    Sep 2006
    Ort
    Denmark
    Beiträge
    664
    Points
    9.316
    Level
    64
    Downloads
    0
    Uploads
    0

    Standard

    Well... I just started at LUA, and i followed whitehawk's turtorial at
    psp-programming.com

    So what now? I only know how to make a loading screen, and load screenshots. EDIT: Also load sounds.

    EDIT: (I'm currently using Luaplayer 19 and script.lua file.)

    I don't even know how to move an object if i want to make a ping pong game.

    I someone could give me a link, or help me on MSN, that would be much appreciated.
    My PSP Projects:
    ___________________
    None.

  26. #4016
    Banned for LIFE
    Points: 18.744, Level: 86
    Level completed: 79%, Points required for next Level: 106
    Overall activity: 0%

    Registriert seit
    Oct 2006
    Ort
    East London, England
    Beiträge
    2
    Points
    18.744
    Level
    86
    Downloads
    0
    Uploads
    0

    Standard

    Gameo i'll help
    -= Double Post =-
    Zitat Zitat von head_54us
    Set a tick count or timer in the game, get the current tick count or value of the timer when you first tap left, then get it again when you tap left again. Check the difference of the values and if it is less then a certain value, perform the action.

    Also you have to be able to detect the difference between a tap and when a direction is held down.
    looks like it's tutorial time. Where should i go ?
    Geändert von eldiablov (11-10-2006 um 10:38 AM Uhr) Grund: Automerged Doublepost

  27. #4017
    lol
    Points: 20.859, Level: 91
    Level completed: 2%, Points required for next Level: 491
    Overall activity: 0%

    Registriert seit
    Aug 2006
    Ort
    Whittier, CA
    Beiträge
    5.791
    Points
    20.859
    Level
    91
    Downloads
    0
    Uploads
    0

    Standard

    Wow, Thats it? Loading media isnt really hard, Just one line.....

  28. #4018
    Banned for LIFE
    Points: 18.744, Level: 86
    Level completed: 79%, Points required for next Level: 106
    Overall activity: 0%

    Registriert seit
    Oct 2006
    Ort
    East London, England
    Beiträge
    2
    Points
    18.744
    Level
    86
    Downloads
    0
    Uploads
    0

    Standard

    Any links to the tutorial about animating your player when holding or double tapping a button. I really need a step by step. It's hard having no knowledge in Lua

  29. #4019
    lol
    Points: 20.859, Level: 91
    Level completed: 2%, Points required for next Level: 491
    Overall activity: 0%

    Registriert seit
    Aug 2006
    Ort
    Whittier, CA
    Beiträge
    5.791
    Points
    20.859
    Level
    91
    Downloads
    0
    Uploads
    0

    Standard

    If you need tuts try here,
    http://www.evilmana.com/tutorials/
    -= Double Post =-
    Or even here,
    http://forums.qj.net/f-psp-developme...ets-63115.html
    These are great!
    Geändert von Anti-QJ (11-10-2006 um 01:06 PM Uhr) Grund: Automerged Doublepost

  30. #4020
    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

    i would try animation lib 3. but, you need a better understaanding of lua first..
    --------------------------------------------------------------------------------------


 

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 .