Seite 112 von 342 ErsteErste ... 12 62 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 162 212 ... LetzteLetzte
Zeige Ergebnis 3.331 bis 3.360 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 dont know Lua Players exit function... but you sure can cause a purposeful crash, and send you to the ...

  
  1. #3331
    words are stones in my <3
    Points: 35.274, Level: 100
    Level completed: 0%, Points required for next Level: 0
    Overall activity: 0%

    Registriert seit
    Jul 2005
    Ort
    Spokane
    Beiträge
    5.008
    Points
    35.274
    Level
    100
    My Mood
    Lonely
    Downloads
    1
    Uploads
    0

    Standard

    I dont know Lua Players exit function... but you sure can cause a purposeful crash, and send you to the XMB.

    I also heard 'os.exit()' works.



    ...at what speed must I live.. to be able to see you again?...

    Projects

    You can support my Open World 3D RPG for PSP by voting for it here


  2. #3332
    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 SG57
    I dont know Lua Players exit function... but you sure can cause a purposeful crash, and send you to the XMB.

    I also heard 'os.exit()' works.
    i think u need luaplayer .17dk2 or something like that tho.
    --------------------------------------------------------------------------------------

  3. #3333
    QJ Gamer Blue
    Points: 4.519, Level: 42
    Level completed: 85%, Points required for next Level: 31
    Overall activity: 0%

    Registriert seit
    Apr 2006
    Beiträge
    120
    Points
    4.519
    Level
    42
    Downloads
    0
    Uploads
    0

    Standard

    os.exit exits to xmb. But is there a way to exit to luaplayer?

  4. #3334
    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 Shadox75
    os.exit exits to xmb. But is there a way to exit to luaplayer?
    i think "break" (that only exits your loop, so if u put it in ur main loop, it should exit to luaplayer)
    --------------------------------------------------------------------------------------

  5. #3335
    words are stones in my <3
    Points: 35.274, Level: 100
    Level completed: 0%, Points required for next Level: 0
    Overall activity: 0%

    Registriert seit
    Jul 2005
    Ort
    Spokane
    Beiträge
    5.008
    Points
    35.274
    Level
    100
    My Mood
    Lonely
    Downloads
    1
    Uploads
    0

    Standard

    Actually, when Lua Player runs through the entire script, then does it return to Lua Player, or that weird Press STart to restart thing...

    So ya, without an ifnite loop, or something stopping it from reaching hte end, then it goes to Lua Player.

    ...at what speed must I live.. to be able to see you again?...

    Projects

    You can support my Open World 3D RPG for PSP by voting for it here


  6. #3336
    QJ Gamer Green
    Points: 8.746, Level: 62
    Level completed: 99%, Points required for next Level: 4
    Overall activity: 0%

    Registriert seit
    Feb 2006
    Ort
    www.ultimatetalkforums.com Games, RPG, quickchat and more!
    Beiträge
    532
    Points
    8.746
    Level
    62
    Downloads
    0
    Uploads
    0

    Standard

    hey how come this doesnt work...??? i want it to make it so when u press cross....you exit the game...

    Code:
    menu = Image.load("menu5.png")
    while true do     
    
         screen:blit(0,0,menu,true)
         screen.waitVblankStart(1)
         screen.flip()
    
     pad = Controls.read()
           if pad:up() then
                dofile ("menu4.lua")
    elseif pad:down() then
               dofile("test.lua")
    
    elsif pad:cross() then
    break
    
    end
    end
    [CENTER][COLOR=black][COLOR=black][URL="http://forums.qj.net/f-psp-firmware-discussion-253/t-psp-firmware-30-get-it-58053.html"][COLOR=cyan]would you upgrade?[/COLOR][/URL] [/COLOR][FONT=Times New Roman][COLOR=navy][URL="http://www.mindistortion.net/iwantyoursoul/?i_am=altunozara"]OMG ITS REAL![/URL][/COLOR][/FONT][COLOR=black] [URL="http://forums.qj.net/showthread.php?t=61756&page=1&pp=10"][COLOR=lime]Sony vs Nintendo[/COLOR][/URL][/COLOR][/COLOR][/CENTER]
    [CENTER] [/CENTER]
    [CENTER][URL="http://www.ultimatetalkforums.com"][IMG]http://i94.photobucket.com/albums/l82/Altunozara/userbar2.jpg[/IMG][/URL][/CENTER]
    [CENTER][SIZE=3]i [/SIZE][URL="http://forums.qj.net/www.gamingwell.com"][SIZE=3]wonder what could be under this hyperlink..hmm[/SIZE][/URL][/CENTER]
    [CENTER][SIZE=3][COLOR=green][B][I]Maniakc is awsome!!![/I][/B][/COLOR][/SIZE][/CENTER]
    [CENTER][FONT=Arial Black][SIZE=3][COLOR=#660099][I][U][URL="http://forums.qj.net/member.php?u=58299"]The Brain Pwns!!![/URL][/U][/I][/COLOR][/SIZE][/FONT][/CENTER]

    [COLOR=sienna]Creator of:[/COLOR][URL="http://forums.qj.net/f-psp-development-forum-11/t-release-go-go-go-beta-66652.html"][COLOR=sienna]GO GO GO![/COLOR][/URL]

  7. #3337
    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 altunozara
    hey how come this doesnt work...??? i want it to make it so when u press cross....you exit the game...

    Code:
    menu = Image.load("menu5.png")
    while true do     
    
         screen:blit(0,0,menu,true)
         screen.waitVblankStart(1)
         screen.flip()
    
     pad = Controls.read()
           if pad:up() then
                dofile ("menu4.lua")
    elseif pad:down() then
               dofile("test.lua")
    
    elsif pad:cross() then
    break
    
    end
    end
    Well what error does it give? Anyways you put elsif, instead of elseif.


  8. #3338
    QJ Gamer Green
    Points: 8.746, Level: 62
    Level completed: 99%, Points required for next Level: 4
    Overall activity: 0%

    Registriert seit
    Feb 2006
    Ort
    www.ultimatetalkforums.com Games, RPG, quickchat and more!
    Beiträge
    532
    Points
    8.746
    Level
    62
    Downloads
    0
    Uploads
    0

    Standard

    ok well i fixed that...so now its that code...but with elseif...it goes to the thing...but when its time to click x i click x...and nothing happens?
    [CENTER][COLOR=black][COLOR=black][URL="http://forums.qj.net/f-psp-firmware-discussion-253/t-psp-firmware-30-get-it-58053.html"][COLOR=cyan]would you upgrade?[/COLOR][/URL] [/COLOR][FONT=Times New Roman][COLOR=navy][URL="http://www.mindistortion.net/iwantyoursoul/?i_am=altunozara"]OMG ITS REAL![/URL][/COLOR][/FONT][COLOR=black] [URL="http://forums.qj.net/showthread.php?t=61756&page=1&pp=10"][COLOR=lime]Sony vs Nintendo[/COLOR][/URL][/COLOR][/COLOR][/CENTER]
    [CENTER] [/CENTER]
    [CENTER][URL="http://www.ultimatetalkforums.com"][IMG]http://i94.photobucket.com/albums/l82/Altunozara/userbar2.jpg[/IMG][/URL][/CENTER]
    [CENTER][SIZE=3]i [/SIZE][URL="http://forums.qj.net/www.gamingwell.com"][SIZE=3]wonder what could be under this hyperlink..hmm[/SIZE][/URL][/CENTER]
    [CENTER][SIZE=3][COLOR=green][B][I]Maniakc is awsome!!![/I][/B][/COLOR][/SIZE][/CENTER]
    [CENTER][FONT=Arial Black][SIZE=3][COLOR=#660099][I][U][URL="http://forums.qj.net/member.php?u=58299"]The Brain Pwns!!![/URL][/U][/I][/COLOR][/SIZE][/FONT][/CENTER]

    [COLOR=sienna]Creator of:[/COLOR][URL="http://forums.qj.net/f-psp-development-forum-11/t-release-go-go-go-beta-66652.html"][COLOR=sienna]GO GO GO![/COLOR][/URL]

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

    You don't use "break". The only way to exit back to the XMB is "System.Quit()". But this only works in the LuaPlayer Mod by Cools. You can get it at psplua.com

  10. #3340
    Developer
    Points: 5.162, Level: 46
    Level completed: 6%, Points required for next Level: 188
    Overall activity: 0%

    Registriert seit
    Feb 2006
    Ort
    Tauranga, New Zealand
    Beiträge
    355
    Points
    5.162
    Level
    46
    Downloads
    0
    Uploads
    0

    Standard

    Zitat Zitat von ARza
    You don't use "break". The only way to exit back to the XMB is "System.Quit()". But this only works in the LuaPlayer Mod by Cools. You can get it at psplua.com
    No, you can use "os.exit()" and it works on all versions of LuaPlayer.

  11. #3341
    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

    That's news to me. I asked a question about this once, and the only answer I got was System.Quit() with the LuaPlayer mod.

  12. #3342
    is not posting very often
    Points: 33.152, Level: 100
    Level completed: 0%, Points required for next Level: 0
    Overall activity: 99,6%

    Registriert seit
    Feb 2006
    Ort
    omnipresent
    Beiträge
    5.162
    Points
    33.152
    Level
    100
    Downloads
    0
    Uploads
    0

    Standard

    os.exit() doesnt do anything for me
    What did we think the world would look like in 2015?

    Zitat Zitat von Abe
    Either way, if you don't know, don't guess. Stick to answering questions about stuff you're qualified to answer, like Pokemon questions or something along those lines.
    http://forums.qj.net/501501-post26.html

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

    OK, I'm making that "game" that I made a thread about yesterday. I have all the movement done. What I want to do is make it so when you press X, it turns that square black. Well, I do an if/then statement, and of course, it stays on, then dissapears when you let go of X. The question I want to know is, how can I make that square stay black? And I don't want something like this:

    if pad:cross() then
    square_is_black = true
    end

    if square_is_black == true then
    screen:blit(block)
    end

    If I did this, I would need over 3200 if/then statements. And I really don't want to do that.

  14. #3344
    is not posting very often
    Points: 33.152, Level: 100
    Level completed: 0%, Points required for next Level: 0
    Overall activity: 99,6%

    Registriert seit
    Feb 2006
    Ort
    omnipresent
    Beiträge
    5.162
    Points
    33.152
    Level
    100
    Downloads
    0
    Uploads
    0

    Standard

    use a table maybe?
    What did we think the world would look like in 2015?

    Zitat Zitat von Abe
    Either way, if you don't know, don't guess. Stick to answering questions about stuff you're qualified to answer, like Pokemon questions or something along those lines.
    http://forums.qj.net/501501-post26.html

  15. #3345
    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 Glynnder
    use a table maybe?
    What do you mean?

  16. #3346
    Developer
    Points: 8.360, Level: 61
    Level completed: 70%, Points required for next Level: 90
    Overall activity: 16,0%

    Registriert seit
    Jun 2005
    Ort
    At my house...
    Beiträge
    886
    Points
    8.360
    Level
    61
    Downloads
    0
    Uploads
    0

    Standard

    like into an array of black and white tiles.

    Tiles = {

    wwwwwwwwww
    bbbbbbbbbb
    wwbwbwbwbw
    wbwbwbwbwb
    wwwwwwwwww
    }

    and so on
    F.A.L.O?

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

    OK, noob question, how would I change a vaiable from an array like that. For example

    array = {
    121010010
    101010101
    101001100
    }
    How would I change the 2 to a 1?

  18. #3348
    Developer
    Points: 8.360, Level: 61
    Level completed: 70%, Points required for next Level: 90
    Overall activity: 16,0%

    Registriert seit
    Jun 2005
    Ort
    At my house...
    Beiträge
    886
    Points
    8.360
    Level
    61
    Downloads
    0
    Uploads
    0

    Standard

    I think that would be a hard way of doing it lol cuz like a variable you would have to change the whole thing.
    F.A.L.O?

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

    Well, does anyone know this. How would you change a variable in a table like this?

    table = {}
    table[1] = {1,0,1,0,1,1,1,0,1,0,1,1}
    table[2] = {1,0,1,0,1,1,1,0,1,0,1,1}
    table[3] = {1,0,1,0,1,1,1,0,1,0,1,1}

  20. #3350
    Developer
    Points: 8.360, Level: 61
    Level completed: 70%, Points required for next Level: 90
    Overall activity: 16,0%

    Registriert seit
    Jun 2005
    Ort
    At my house...
    Beiträge
    886
    Points
    8.360
    Level
    61
    Downloads
    0
    Uploads
    0

    Standard

    well each of those is still a variable tho... So you would still have to change the whole variable exept you would only have to do one row at a time.
    F.A.L.O?

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

    Well, in a table like this:

    table = {8,20,38,49}

    I would just have to table[4] = 39 and it would change the value.
    Could I just do this

    table[3][6] = 0

    EDIT: Turns out the above actually does work. I'm going to do that. Thanks for your help though.
    Geändert von ARza (08-24-2006 um 04:06 PM Uhr)

  22. #3352
    Developer
    Points: 8.360, Level: 61
    Level completed: 70%, Points required for next Level: 90
    Overall activity: 16,0%

    Registriert seit
    Jun 2005
    Ort
    At my house...
    Beiträge
    886
    Points
    8.360
    Level
    61
    Downloads
    0
    Uploads
    0

    Standard

    Glad i could kinda help lol
    I did help u eliminate other processes tho
    F.A.L.O?

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

    Yeah, that helped me out. I could have spent hours trying those other ideas.

  24. #3354
    Points: 3.957, Level: 40
    Level completed: 4%, Points required for next Level: 193
    Overall activity: 0%

    Registriert seit
    Jul 2006
    Beiträge
    36
    Points
    3.957
    Level
    40
    Downloads
    0
    Uploads
    0

    Standard

    ok is there some kind of code for a magnet effect.

    so like when x is pressed object one starts moving torwards object 2

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

    OK, I'll give you an example where object 2 is on the right.

    if object1.x < 0bject2.x and pad:cross() then
    object1.x = object1.x + 4
    end

    So if object1 is farther to the left than object 2 and youi press x, then object 1 will start moving to the right.

  26. #3356
    Points: 3.957, Level: 40
    Level completed: 4%, Points required for next Level: 193
    Overall activity: 0%

    Registriert seit
    Jul 2006
    Beiträge
    36
    Points
    3.957
    Level
    40
    Downloads
    0
    Uploads
    0

    Standard

    yea i figured that out but i need it work despite where they are
    like diagonal and stuff

  27. #3357
    is not posting very often
    Points: 33.152, Level: 100
    Level completed: 0%, Points required for next Level: 0
    Overall activity: 99,6%

    Registriert seit
    Feb 2006
    Ort
    omnipresent
    Beiträge
    5.162
    Points
    33.152
    Level
    100
    Downloads
    0
    Uploads
    0

    Standard

    you could create an invisible shape the surronds the one you want to keep the other shape away from and if the other shpae touches the invisible shape then it gets like, glued there?
    What did we think the world would look like in 2015?

    Zitat Zitat von Abe
    Either way, if you don't know, don't guess. Stick to answering questions about stuff you're qualified to answer, like Pokemon questions or something along those lines.
    http://forums.qj.net/501501-post26.html

  28. #3358
    Points: 3.957, Level: 40
    Level completed: 4%, Points required for next Level: 193
    Overall activity: 0%

    Registriert seit
    Jul 2006
    Beiträge
    36
    Points
    3.957
    Level
    40
    Downloads
    0
    Uploads
    0

    Standard

    thats not what im tryin to do here ill explain my game, the enemy scrolls left to right on top and i scroll l/r on bottom. i need him to fire at me where ever i am

    ill use the magnet effect for the bullet so it draws torwards me

  29. #3359
    Developer
    Points: 4.318, Level: 41
    Level completed: 84%, Points required for next Level: 32
    Overall activity: 0%

    Registriert seit
    Jul 2006
    Beiträge
    205
    Points
    4.318
    Level
    41
    Downloads
    0
    Uploads
    0

    Standard

    You just need to expand ARza's code to work in the y direction also. As long as you don't use "elseif," both statements will execute and it will move diagonally.

  30. #3360
    Points: 3.957, Level: 40
    Level completed: 4%, Points required for next Level: 193
    Overall activity: 0%

    Registriert seit
    Jul 2006
    Beiträge
    36
    Points
    3.957
    Level
    40
    Downloads
    0
    Uploads
    0

    Standard

    u dont understand, that keeps the bullet paths very limmited

    ive already tried it


 

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

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