Seite 133 von 342 ErsteErste ... 33 83 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 183 233 ... LetzteLetzte
Zeige Ergebnis 3.961 bis 3.990 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 the undead Wrong, their was a post a while back but i dont know were it is now....and ...

  
  1. #3961
    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

    Zitat Zitat von the undead
    Wrong, their was a post a while back but i dont know were it is now....and yes their is a way
    No, there isn't, or Lua Player couldn't read them.


    [I fail @ life]

  2. #3962
    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

    I still need to know how to load and use a font on the text you print to the screen.

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

    Zitat Zitat von FreePlay
    No, there isn't, or Lua Player couldn't read them.
    Yes there is. You just compile the Lua scripts using Luac.exe in the Lua Binary repository. I tried this a while back.

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

    nvm. figured it out... now how do you reset your game. not going to lowser, but just reloading your game...like the reset button on an n64.

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

    Umm, only way I can think is somethin like this: Have index.lua be nothing but: dofile("game.lua")

    And then in game.lua make something do break and thatll restart. Then how do you exit all the way out though.....

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

    I need the code for exiting to the XMB from a pause menu

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

    os.exit() doesnt work so i dont think theres a way.

  8. #3968
    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

    Code:
    white = Color.new(255,255,255)
    menuBackground = Image.load("menuBackground.png")
    usb = 0
    while true do
    screen:clear()
    screen:blit(0,0,menuBackground)
    pad = Controls.read()
    if usb == 0 then
    screen:print(0,0,"Off",white)
    end
    if pad:r() and usb == 1 then
    System.usbDiskModeDeactivate()
    usb = 0
    end
    if pad:r() and usb == 0 then
    System.usbDiskModeActivate()
    usb = 1
    end
    if usb == 1 then
    screen:print(0,0,"On",white)
    end
    screen.waitVblankStart()
    screen.flip()
    end
    i think its loading usb and turning it off and on so fast that it will never say off or shutoff. how do i fix it?
    Geändert von Cheez Pirate (11-07-2006 um 05:53 PM Uhr) Grund: Automerged Doublepost

  9. #3969
    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

    So theres no way of exiting to XMB? O well....

  10. #3970
    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

    Zitat Zitat von head_54us
    Yes there is. You just compile the Lua scripts using Luac.exe in the Lua Binary repository. I tried this a while back.
    ... and then can you still run them in the PSP Lua Player?

    Besides... you can always decompile them.
    [I fail @ life]

  11. #3971
    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 -TacticalPaper-
    os.exit() doesnt work so i dont think theres a way.
    Code:
    if pad:start() then
    os.exit()
    end
    This is from the psplua game pack and it works perfectly. It does exit to the XMB.

  12. #3972
    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

    Yes, It still runs in LUA Player, It just make sure no one steals your code.

  13. #3973
    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 pspgamer81
    Yes, It still runs in LUA Player, It just make sure no one steals your code.
    *Slaps forehead in disbelief of some people's inability to take a hint*

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

    Sorry, Jeez

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

    Code:
    white = Color.new(255,255,255)
    menuBackground = Image.load("menuBackground.png")
    usb = 0
    while true do
    screen:clear()
    screen:blit(0,0,menuBackground)
    pad = Controls.read()
    if usb == 0 then
    screen:print(0,0,"Off",white)
    end
    if pad:r() and usb == 1 then
    System.usbDiskModeDeactivate()
    usb = 0
    screen.waitVblankStart(4)
    end
    if pad:r() and usb == 0 then
    System.usbDiskModeActivate()
    usb = 1
    screen.waitVblankStart(4)
    end
    if usb == 1 then
    screen:print(0,0,"On",white)
    end
    screen.waitVblankStart()
    screen.flip()
    end

  16. #3976
    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

    it doesn't change anything.
    -= Double Post =-
    it still does the quick of on and never shows "off"
    Geändert von Cheez Pirate (11-07-2006 um 06:48 PM Uhr) Grund: Automerged Doublepost

  17. #3977
    QJ Gamer Blue
    Points: 4.119, Level: 40
    Level completed: 85%, Points required for next Level: 31
    Overall activity: 0%

    Registriert seit
    Aug 2006
    Beiträge
    106
    Points
    4.119
    Level
    40
    Downloads
    0
    Uploads
    0

    Standard

    How do i use luac.exe to encrypt the lua files.
    Geändert von Dr.Gringo (11-07-2006 um 07:21 PM Uhr)

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

    Code:
    white = Color.new(255,255,255)
    menuBackground = Image.load("menuBackground.png")
    usb = 0
    while true do
    screen:clear()
    screen:blit(0,0,menuBackground)
    pad = Controls.read()
    if usb == 0 then
    screen:print(0,0,"Off",white)
    end
    if pad:r() and usb == 1 then
    System.usbDiskModeDeactivate()
    usb = 0
    screen.waitVblankStart(4)
    end
    if pad:l() and usb == 0 then
    System.usbDiskModeActivate()
    usb = 1
    screen.waitVblankStart(4)
    end
    if usb == 1 then
    screen:print(0,0,"On",white)
    end
    screen.waitVblankStart()
    screen.flip()
    end
    Try that, it makes different buttons to switch it.

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

    So, i was working on one of my projects and i had a question. If i move an image (cursor) and if i land on a specific part on a screen and press X, how do i make a new image splash on the whole screen?

  20. #3980
    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

    What do you mean, "splash"?

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

    Like make something happen; make a whole new image appear on the whole screen or something happen. I obviously know how to move a cursor, but i don't know how to make something happen if X is pressed in a specific part of a screen (given by X and Y). Like in your periodic table (which is encoded so its hard to learn new things), if you press X on an element it shows the details. I am not using your periodic table in order to make my own (since your is encoded). Yes, i am working on a periodic table, but a totally different code, gfx, more scientific facts about each element.

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

    I can show you the code for my periodic table. I don't even know why I encrypted that part. I just encrypted the other part because it took me like three hours to plot all the data, and I didn't want anyone to steal it.

    Anyway, I think I know what you want to do. Like say you've selected Oxygen, and you press X, you want a list of properties for Oxygen to come up, correct?

  23. #3983
    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

    yes, exactly. But i am not copying your code, i just need some basic ideas about how to make this happen (pressing X on something). Thank you for you help.

    edit:
    by the way, just curious but have you heard of my game pack? you are welcome to get any ideas from there...

  24. #3984
    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 superbatxs
    yes, exactly. But i am not copying your code, i just need some basic ideas about how to make this happen (pressing X on something). Thank you for you help.
    It's quite simple really. First you need a table with your elements.

    Code:
    element = {}
    element[1] = {name = "Hydrogen", number = 1}
    element[2] = {name = "Helium", number = 2}
    So you have all 118 elements on the table. Now you need a variable for your cursor.

    Code:
    current_element = 1
    Now you can do something like this:
    Code:
    screen:print(0,0,element[current_element].name,white)
    screen:print(0,10,element[current_element].number,white)
    I hope you understand. This is what I did in my code, but since there were blank spots, I had to make table entries like:

    Code:
    element[7] = {name = " ", number = " "}
    I can show you my code if you want to. Just ask.

  25. #3985
    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

    How do i use luaC to encrypt my script?

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

    if pad:cross() and cursor.x > lowestxpointofclickableit em and cursor.x < highestxpointofclickablei tem and cursor.y > lowestypointofclickableit em and cursor.y < highestypointofclickableo bject then
    whatshorldhappenthenthing isclicked
    end

  27. #3987
    QJ Gamer Blue
    Points: 4.119, Level: 40
    Level completed: 85%, Points required for next Level: 31
    Overall activity: 0%

    Registriert seit
    Aug 2006
    Beiträge
    106
    Points
    4.119
    Level
    40
    Downloads
    0
    Uploads
    0

    Standard

    Zitat Zitat von pspgamer81
    How do i use luaC to encrypt my script?
    Yeah!! I wanna know too.....

  28. #3988
    .info
    Points: 15.395, Level: 80
    Level completed: 9%, Points required for next Level: 455
    Overall activity: 0%

    Registriert seit
    Jun 2006
    Ort
    ACT, Australia
    Beiträge
    1.674
    Points
    15.395
    Level
    80
    Downloads
    0
    Uploads
    0

    Standard

    Zitat Zitat von the undead
    Wrong, their was a post a while back but i dont know were it is now....and yes their is a way
    No their isn't!
    But there is a way to encrypt your lua code.....And yes, it does work

    http://www.yongobongo.com
    PSN - yongobongo

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

    http://forums.evilmana.com/index.php?topic=273.0
    Thats a thread on compiling lua files. My last post is how you could make the mouse do something when x is pressed and its at a certain point.

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

    Zitat Zitat von FreePlay
    ... and then can you still run them in the PSP Lua Player?

    Besides... you can always decompile them.
    Yes you can run them in LuaPlayer and although you can decompile them, it won't be in a readable format as it is compiled into byte code.


 

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 .