Seite 162 von 342 ErsteErste ... 62 112 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 212 262 ... LetzteLetzte
Zeige Ergebnis 4.831 bis 4.860 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; Simple logic ;)...

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

    Simple logic ;)



    ...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. #4832
    QJ Gamer Blue
    Points: 4.561, Level: 43
    Level completed: 6%, Points required for next Level: 189
    Overall activity: 0%

    Registriert seit
    May 2006
    Beiträge
    224
    Points
    4.561
    Level
    43
    Downloads
    0
    Uploads
    0

    Standard

    Zitat Zitat von Grimfate126
    'local' means that only the function you called it in can access the variable.
    thanks man

  3. #4833
    QJ Gamer Green
    Points: 6.453, Level: 52
    Level completed: 52%, Points required for next Level: 97
    Overall activity: 0%

    Registriert seit
    Jul 2006
    Ort
    BEHIND YOU!!
    Beiträge
    1.061
    Points
    6.453
    Level
    52
    Downloads
    0
    Uploads
    0

    Standard

    Zitat Zitat von jamz1825
    ok I wasnt sure if i should post this in this thread or not but here it is:

    For school im doing a long term project on developing a program for the psp in c/c++.

    I thought i had longer than i had so i cant learn the amount of info i need in time.

    Basically is there a way that i can imbed a lua file in an eboot so that even if you open up the eboot you couldnt tell that its a lua file or w/e inside. This way i could just pretend its in c and i could make it better and get a better grade since im pretty good at lua
    Well if your professor or whatever has seen anything on psp he may easily be able to spot it. But if he doesn't own a psp then he will not know whatsoever. But for a project like that you will most likely have to show him your sources so...
    [url=http://xs.to][img]http://xs313.xs.to/xs313/07106/wmnp8z.png[/img][/url]

    What's a recovery.elf
    [QUOTE=iball]
    He's the one that fixes Santa's sleigh when it breaks down[/QUOTE]

    [QUOTE=Deturbanator]why are we allowed to see the whole flesh and being of the boob but we MUST blur out the tit?[/QUOTE]
    [PRE][B]sg57 i love you for turning on the light of homebrew when i was in the darkness of sony[/b][/pre]

  4. #4834
    Points: 4.594, Level: 43
    Level completed: 22%, Points required for next Level: 156
    Overall activity: 0%

    Registriert seit
    Jul 2005
    Beiträge
    6
    Points
    4.594
    Level
    43
    Downloads
    0
    Uploads
    0

    Standard

    I'm trying to learn to learn how to use functions in lua, but I get a bunch of errors when i try to transfer the value of a variable from a function back to a variable of the same name in the main loop.

    sigh, I'm probably just not getting something. Does anyone know where I can learn how to use functions correctly? All of the newby tutorials I've come across have been too basic or un-indepth for what i am trying to do.

  5. #4835
    Ponies and Unicorns
    Points: 5.778, Level: 49
    Level completed: 14%, Points required for next Level: 172
    Overall activity: 0%

    Registriert seit
    Aug 2006
    Ort
    Pelennor Fields
    Beiträge
    547
    Points
    5.778
    Level
    49
    Downloads
    0
    Uploads
    0

    Standard

    www.evilmana.com

    And heres something Im just gonna throw together that should work

    Code:
    function addition() 
    variable = 2
    bill = 3
    check = variable + bill
    end
    while true do
    addition()
    screen:print(0,0,check,red)
    screen.waitVblankStart()
    screen.flip
    end
    You mean stuff like that doesnt work for you? If not then your probally doing something wrong check the tuts on evilmana for more info.
    If you play WoW come find me on DOOMHAMMER (US) I am Human mage lvl 64 Atrana is the name (dont ask for runs!)
    Gold donations are highly appreciated!

  6. #4836
    QJ Gamer Blue
    Points: 4.918, Level: 44
    Level completed: 84%, Points required for next Level: 32
    Overall activity: 0%

    Registriert seit
    Sep 2006
    Ort
    6ft. Down Underground........Oh and guess what my avatar is
    Beiträge
    387
    Points
    4.918
    Level
    44
    Downloads
    0
    Uploads
    0

    Standard

    Zitat Zitat von jamz1825
    ok I wasnt sure if i should post this in this thread or not but here it is:

    For school im doing a long term project on developing a program for the psp in c/c++.

    I thought i had longer than i had so i cant learn the amount of info i need in time.

    Basically is there a way that i can imbed a lua file in an eboot so that even if you open up the eboot you couldnt tell that its a lua file or w/e inside. This way i could just pretend its in c and i could make it better and get a better grade since im pretty good at lua
    what if he ask's to see the source?

  7. #4837
    QJ Gamer Green
    Points: 13.310, Level: 75
    Level completed: 15%, Points required for next Level: 340
    Overall activity: 0%

    Registriert seit
    Dec 2005
    Ort
    Here
    Beiträge
    2.715
    Points
    13.310
    Level
    75
    Downloads
    0
    Uploads
    0

    Standard

    Zitat Zitat von joshparrisjosh
    I'm trying to learn to learn how to use functions in lua, but I get a bunch of errors when i try to transfer the value of a variable from a function back to a variable of the same name in the main loop.

    sigh, I'm probably just not getting something. Does anyone know where I can learn how to use functions correctly? All of the newby tutorials I've come across have been too basic or un-indepth for what i am trying to do.
    wait wait, lemme get this straight. you used the same .. word for a variable and a function?

    like this?:

    Code:
    variable = something
    
    (some code)
    
    function variable()
    if so, that wouldnt work, as you just found out.

    if this has nothing to do with your problem, well then, the first thing you gotta know about getting help is that you post your code up and say what error luaplayer gives you. that way, people can .. well help you. :)
    [CENTER][IMG]http://img148.imageshack.us/img148/6985/siglw8.jpg[/IMG][/CENTER]

  8. #4838
    Points: 4.594, Level: 43
    Level completed: 22%, Points required for next Level: 156
    Overall activity: 0%

    Registriert seit
    Jul 2005
    Beiträge
    6
    Points
    4.594
    Level
    43
    Downloads
    0
    Uploads
    0

    Standard

    Okay well here's my code, just promise not to make fun of me because of how bad it seems. :o


    white = Color.new(255,255,255)
    green = Color.new(0,255,0)

    locke = 1
    truewords = nil



    function loopy(locke, truewords)


    while locke > 0 do
    screen:clear()
    pad = Controls.read()

    screenrint(0,0,"Pick a song", white)

    if pad:up() then
    screenrint(100,100,"turn it up",green)
    if pad:up() and pad:cross() then
    locke = 0
    truewords = "turn it up"
    end
    end

    if pad:down() then
    screenrint(100,100,"the sharpest lives", green)
    if pad:down() and pad:cross() then
    locke = 0
    truewords = "the sharpest lives"
    end
    end


    screen.waitVblankStart()
    screen.flip()
    end

    return truewords
    return locke
    end



    while true do

    screen:clear()
    pad = Controls.read()

    loopy(locke, truewords)

    if locke > -1 then
    screenrint(100,100,"press x to continue")
    if pad:cross() then
    locke = locke - 1
    end
    end

    if locke == -1 then
    screenrint(100,100,truewords,wh ite)
    end


    screen.waitVblankStart()
    screen.flip()
    end

  9. #4839
    Ponies and Unicorns
    Points: 5.778, Level: 49
    Level completed: 14%, Points required for next Level: 172
    Overall activity: 0%

    Registriert seit
    Aug 2006
    Ort
    Pelennor Fields
    Beiträge
    547
    Points
    5.778
    Level
    49
    Downloads
    0
    Uploads
    0

    Standard

    First off dont quote your code. Code your code . It stops the smileys and the space problem. Secondly whats the problem with your code?

    EDIT: O AND [email protected]!!!!!!!!!!!!!!!! SWEEEEEEEEEEEETTTTTTTTTTT TTTTTTTTTT YAAAAAAAAAAA
    400 pOSTS !!! YA
    If you play WoW come find me on DOOMHAMMER (US) I am Human mage lvl 64 Atrana is the name (dont ask for runs!)
    Gold donations are highly appreciated!

  10. #4840
    Points: 4.594, Level: 43
    Level completed: 22%, Points required for next Level: 156
    Overall activity: 0%

    Registriert seit
    Jul 2005
    Beiträge
    6
    Points
    4.594
    Level
    43
    Downloads
    0
    Uploads
    0

    Standard

    the problem with my code is that without the "function loopy()" everything is gravy, but in its current state as posted... after the code executes to the point where it should blit the varible "truewords" it get the error that truewords is a nil value. This to me seems to point in the dirrection that my "function loopy()" isn't changing the value of truewords into a string as i would like it to.

    Is this possible? I mean to change it to string through the use of a function?

  11. #4841
    Ponies and Unicorns
    Points: 5.778, Level: 49
    Level completed: 14%, Points required for next Level: 172
    Overall activity: 0%

    Registriert seit
    Aug 2006
    Ort
    Pelennor Fields
    Beiträge
    547
    Points
    5.778
    Level
    49
    Downloads
    0
    Uploads
    0

    Standard

    Very annoying all im trying to make is a simple screen saver app thing for me alone and lua player is being quite a fuc...... fucey... ya fucey. anyways I try to run this and i get an error a very common error that i see in almost all my homebrew games

    error: script.lua:74: '=' expected near 'end'

    And I go through this code over and over and i cant find anything wrong plz help.
    Spoiler for Snow Simulator:
    Code:
    -- Snow Simulator By GuitarGod1134
    -- just simulates a snow weather condition
    --color
    white = Color.new(255,255,255)
    --pics
    snow = Image.create(10,10)
    snow:clear(white)
    background = Image.load("background.png")
    --x = width y = hieght
    snowxy = {}
    snowxy[1] = { x = 30, y = -300}
    snowxy[2] = { x = 200, y = -300}
    snowxy[3] = { x = 110, y = -300}
    snowxy[4] = { x = 97, y = -300}
    snowxy[5] = { x = 400, y = -300}
    snowxy[6] = { x = 300, y = -390}
    snowxy[7] = { x = 250, y = -300}
    --is the snow falling
    falling = "true"
    --main loop
    while true do
    screen:clear()
    --blit the background
    screen:blit(0,0,background)
    --blit the snow
    snowy = "true"
    if snowy == "true" then
    screen:blit(snowxy[1].x, snowxy[1].y, snow)
    screen:blit(snowxy[2].x, snowxy[2].y, snow)
    screen:blit(snowxy[3].x, snowxy[3].y, snow)
    screen:blit(snowxy[4].x, snowxy[4].y, snow)
    screen:blit(snowxy[5].x, snowxy[5].y, snow)
    screen:blit(snowxy[6].x, snowxy[6].y, snow)
    screen:blit(snowxy[7].x, snowxy[7].y, snow)
    end
    --make the snow fall
    if falling == "true" then
    snowxy[1].y = snowxy[1].y + 2
    snowxy[2].y = snowxy[2].y + 2
    snowxy[3].y = snowxy[3].y + 2
    snowxy[4].y = snowxy[4].y + 2
    snowxy[5].y = snowxy[5].y + 2
    snowxy[6].y = snowxy[6].y + 2
    snowxy[7].y = snowxy[7].y + 2
    end
    --now we reset them back to true so they can
    --fall down again
    if snowxy[6].y == 272 then
    falling = "false"
    end
    --all the snow flakes
    --are reset back
    --to thier original
    --y coordinates
    if falling == "false" then
    backup = "true"
    snowxy[1].y = -300
    snowxy[2].y = -300
    snowxy[3].y = -300
    snowxy[4].y = -300
    snowxy[5].y = -300
    snowxy[6].y = -390
    snowxy[7].y = -300
    end
    --once they reach the bottom
    --falling is declared true again
    --so that it makes the affect
    --that the snow is always falling
    if backup == "true" then
    falling = "true"
    end
    screen.waitVblankStart()
    screen.flip
    end
    If you play WoW come find me on DOOMHAMMER (US) I am Human mage lvl 64 Atrana is the name (dont ask for runs!)
    Gold donations are highly appreciated!

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

    Code:
    screen.flip
    should be
    Code:
    screen.flip()

  13. #4843
    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 it says its expecting = because it expects you're declaring screen.flip as a variable because you forgot the function arguments.

  14. #4844
    QJ Gamer Green
    Points: 13.310, Level: 75
    Level completed: 15%, Points required for next Level: 340
    Overall activity: 0%

    Registriert seit
    Dec 2005
    Ort
    Here
    Beiträge
    2.715
    Points
    13.310
    Level
    75
    Downloads
    0
    Uploads
    0

    Standard

    hey i was wondering, since screen.flip() has parantheses, can it be 'customized'? like how you can put a color in 'screen:clear()'? i'm having a hard time imagining whats possible to 'customize' about flipping the screen...but, i'm sure there is SOMEthing you can do with it...
    [CENTER][IMG]http://img148.imageshack.us/img148/6985/siglw8.jpg[/IMG][/CENTER]

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

    screen.flip doesn't take any arguements so no.

    Ref: http://wiki.ps2dev.org/psp:lua_player:functions

  16. #4846
    Ponies and Unicorns
    Points: 5.778, Level: 49
    Level completed: 14%, Points required for next Level: 172
    Overall activity: 0%

    Registriert seit
    Aug 2006
    Ort
    Pelennor Fields
    Beiträge
    547
    Points
    5.778
    Level
    49
    Downloads
    0
    Uploads
    0

    Standard

    Ok thanks guys ill try that.
    If you play WoW come find me on DOOMHAMMER (US) I am Human mage lvl 64 Atrana is the name (dont ask for runs!)
    Gold donations are highly appreciated!

  17. #4847
    QJ Gamer Blue
    Points: 4.031, Level: 40
    Level completed: 41%, Points required for next Level: 119
    Overall activity: 0%

    Registriert seit
    Aug 2006
    Ort
    c:\Program Files\World of Warcraft\WoW.exe
    Beiträge
    98
    Points
    4.031
    Level
    40
    Downloads
    0
    Uploads
    0

    Standard

    Hey, I can't figure out how to get the stupid analog to work.... I dont really understand the numbers. Can someone show me an example of analog in use to move a character on the screen?

    Also, whenever i put music in my game, it lags it so much its unplayable.
    How can I fix this?

    Thanks a lot for your help.

  18. #4848
    Points: 8.718, Level: 62
    Level completed: 90%, Points required for next Level: 32
    Overall activity: 0%

    Registriert seit
    Sep 2006
    Beiträge
    484
    Points
    8.718
    Level
    62
    Downloads
    0
    Uploads
    0

    Standard

    Analog:
    Code:
       pad =  Controls.read(); 
       if math.abs(pad:analogX()) > 20 then 
          x = x + pad:analogX() / 64; 
       end 
       if math.abs(pad:analogY()) > 20 then 
          y = y + pad:analogY() / 64; 
       end 
       screen:print(x,y-5,"<|",w); 
       screen.waitVblankStart(); 
       screen.flip()
    just replace
    Code:
     screen:print(x,y-5,"<|",w);
    with what ever you want to move like a pic. :)
    Hope that answers your question.

    As for music:
    this should work:
    boltsnd = Sound.load("music/comp.wav")
    If it lags up your putting too many pics slowing it down and OR your song is too long/too much space, OR somethins wrong with your PSP.

  19. #4849
    Ponies and Unicorns
    Points: 5.778, Level: 49
    Level completed: 14%, Points required for next Level: 172
    Overall activity: 0%

    Registriert seit
    Aug 2006
    Ort
    Pelennor Fields
    Beiträge
    547
    Points
    5.778
    Level
    49
    Downloads
    0
    Uploads
    0

    Standard

    Actually pspfreak9 the correct way to load music is

    yoursound = Sound.load("yoursound.wav ",false)

    false is there so it doesnt loop over and over. If you want it to loop then use true.
    If you play WoW come find me on DOOMHAMMER (US) I am Human mage lvl 64 Atrana is the name (dont ask for runs!)
    Gold donations are highly appreciated!

  20. #4850
    Points: 8.718, Level: 62
    Level completed: 90%, Points required for next Level: 32
    Overall activity: 0%

    Registriert seit
    Sep 2006
    Beiträge
    484
    Points
    8.718
    Level
    62
    Downloads
    0
    Uploads
    0

    Standard

    It works my way to and false is a default. :) But both ways work. ;)

  21. #4851
    QJ Gamer Blue
    Points: 5.174, Level: 46
    Level completed: 12%, Points required for next Level: 176
    Overall activity: 0%

    Registriert seit
    Feb 2006
    Beiträge
    125
    Points
    5.174
    Level
    46
    Downloads
    0
    Uploads
    0

    Standard

    I need help, I need to generate 9 numbers from 1 to 9 without 2 numbers to be the same.
    How could i do that?
    Geändert von agashka (12-26-2006 um 08:26 PM Uhr)

  22. #4852
    QJ Gamer Blue
    Points: 4.918, Level: 44
    Level completed: 84%, Points required for next Level: 32
    Overall activity: 0%

    Registriert seit
    Sep 2006
    Ort
    6ft. Down Underground........Oh and guess what my avatar is
    Beiträge
    387
    Points
    4.918
    Level
    44
    Downloads
    0
    Uploads
    0

    Standard

    Zitat Zitat von agashka
    I need help, I need to generate 9 numbers from 1 to 9 without 2 numbers to be the same.
    How could i do that?
    use the math.random function
    Code:
    no.1 = math.random(1,9)
    if no.1 == 1 then
    no.2 = math.random(2,9)
    else if no.1 == 2 then
    no.2 = math.random(3,9)
    
    
    
    Etc.

  23. #4853
    QJ Gamer Blue
    Points: 5.174, Level: 46
    Level completed: 12%, Points required for next Level: 176
    Overall activity: 0%

    Registriert seit
    Feb 2006
    Beiträge
    125
    Points
    5.174
    Level
    46
    Downloads
    0
    Uploads
    0

    Standard

    mmm if no.1 = 5 and no.4 = 5....

  24. #4854
    QJ Gamer Blue
    Points: 4.918, Level: 44
    Level completed: 84%, Points required for next Level: 32
    Overall activity: 0%

    Registriert seit
    Sep 2006
    Ort
    6ft. Down Underground........Oh and guess what my avatar is
    Beiträge
    387
    Points
    4.918
    Level
    44
    Downloads
    0
    Uploads
    0

    Standard

    Zitat Zitat von agashka
    mmm if no.1 = 5 and no.4 = 5....
    yup, smething like that, when i wrote mine i was being anoyed but you get the idea

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

    Uh, too bad the_undead has given you faulty code...

    Code:
    number = {}
    
    for i=1,9 do
         number[i] = math.random(1,9)
         for j=1,i do
              while number[i] == number[j] and i ~= j do -- 2 numbers are the same
                   number[i] = math.random(1,9)
              end
         ebd
    end
    You might want to try that, or something similar to it compared to undead's ;)

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


  26. #4856
    QJ Gamer Blue
    Points: 5.174, Level: 46
    Level completed: 12%, Points required for next Level: 176
    Overall activity: 0%

    Registriert seit
    Feb 2006
    Beiträge
    125
    Points
    5.174
    Level
    46
    Downloads
    0
    Uploads
    0

    Standard

    thanks, actually here how i got it working;

    alltoken = {1,2,3,4,5,6,7,8,9}
    x = 9
    gentable ={}
    while x >=1 do
    table.insert(gentable,tab le.remove(alltoken,math.r andom(table.getn(alltoken ))))
    x = x-1 end


    :)

  27. #4857
    Seven Year Vet. BOW DOWN.
    Points: 14.794, Level: 78
    Level completed: 86%, Points required for next Level: 56
    Overall activity: 0%

    Registriert seit
    Dec 2005
    Ort
    Manchester, UK
    Beiträge
    2.240
    Points
    14.794
    Level
    78
    My Mood
    Cheerful
    Downloads
    1
    Uploads
    0

    Standard

    Guys, I've tried everything, and I'm stuck.

    This maybe a weird question, but is there any way i could blit an image at an angle with having to make about 360 pictures of the same car facing in different directions?

    Eg. this number 9 is my car

    '9'

    If i wanted to flip it veritcally, (or any other direction) it would look like this:

    ,6,

    So, from the one image, how would i do this in lua?

  28. #4858
    Ponies and Unicorns
    Points: 5.778, Level: 49
    Level completed: 14%, Points required for next Level: 172
    Overall activity: 0%

    Registriert seit
    Aug 2006
    Ort
    Pelennor Fields
    Beiträge
    547
    Points
    5.778
    Level
    49
    Downloads
    0
    Uploads
    0

    Standard

    Did you search for some functions. THeres probaly one to blit an image at an angle.

    Ok heres my questinos
    I want to open a text file and print the whole file to the screen ie if the text file contains

    aslkdfjaoidnfaoijdfoiajfo ;ia
    dfiojasoifjaodijfoaijd;fi asjf

    i want the psp to say that too. on all the lines. how would i do that?
    If you play WoW come find me on DOOMHAMMER (US) I am Human mage lvl 64 Atrana is the name (dont ask for runs!)
    Gold donations are highly appreciated!

  29. #4859
    Seven Year Vet. BOW DOWN.
    Points: 14.794, Level: 78
    Level completed: 86%, Points required for next Level: 56
    Overall activity: 0%

    Registriert seit
    Dec 2005
    Ort
    Manchester, UK
    Beiträge
    2.240
    Points
    14.794
    Level
    78
    My Mood
    Cheerful
    Downloads
    1
    Uploads
    0

    Standard

    well, the only way you could do that is to blit all the text in a file to one line, unless you do it a line at a time, changing where it blits it every time...
    Can't remember how you do it a line at a time though, but i know theres a way. :Cry:

    And how would i do a search for functions?

  30. #4860
    Ponies and Unicorns
    Points: 5.778, Level: 49
    Level completed: 14%, Points required for next Level: 172
    Overall activity: 0%

    Registriert seit
    Aug 2006
    Ort
    Pelennor Fields
    Beiträge
    547
    Points
    5.778
    Level
    49
    Downloads
    0
    Uploads
    0

    Standard

    I just did a search
    http://search.yahoo.com/search?ei=ut...ua%20functions
    -= Double Post =-
    Ok when I run my code it blits like the scale (not just the scale though its all the pics )but then it keeps flickering the menu and the scale over and over It wont stick with one pic.
    Spoiler for GuitarHelpr:
    Code:
    --This is GuitarGod's NEW GUITARHELPER
    --THe code is completely new 
    
    --first we 
    --define some colors
    red = Color.new(255,0,0)
    blue = Color.new(0,0,255)
    
    --now we load all our pics
    chords1 = Image.load("pics/chords1.png")
    chords2 = Image.load("pics/chords2.png")
    menu = Image.load("pics/menu.png")
    pent = Image.load("pics/pentatonicminor.png")
    scale = Image.load("pics/scale.png")
    tuner = Image.load("pics/tuner.png")
    
    --now that the pics are loaded we load our 
    --sounds for the tuner
    
    elow = Sound.load("sounds/elow.wav", false)
    a = Sound.load("sounds/a.wav", false)
    d = Sound.load("sounds/d.wav", false)
    g = Sound.load("sounds/g.wav", false)
    b = Sound.load("sounds/b.wav", false)
    ehigh = Sound.load("sounds/ehigh.wav", false)
    
    --menu variable
    menublit = "true"
    
    --selector for the menu
    selector = 1
    
    --and the main loop
    
    while true do
    --keep the screen refresed
    
    
    --declare the buttons
    pad = Controls.read()
    
    if menublit == "true" then
    screen:blit(0,0,menu)
    end
    
    --now we print our options
    if menublit == "true" then
    screen:print(180,80,"Pent Min Scale",red)
    screen:print(180,90,"Scale",red)
    screen:print(180,100,"Tuner",red)
    screen:print(180,110,"Chord Chart 1",red)
    screen:print(180,120,"Chord Chart 2",red)
    screen:print(180,130,"Tab Reader",red)
    end
    
    --now for our menu selector
    if pad:up() then
    selector = selector - 1
    end
    
    if pad:down() then
    selector = selector + 1
    end
    
    --now we print our selected options
    if selector == 1 and menublit == "true" then
    screen:print(180,80,"Pent Min Scale",blue)
    end
    
    if selector == 2 and menublit == "true" then
    screen:print(180,90,"Scale",blue)
    end
    
    if selector == 3 and menublit == "true" then
    screen:print(180,100,"Tuner",blue)
    end
    
    if selector == 4 and menublit == "true" then
    screen:print(180,110,"Chord Chart 1", blue)
    end
    
    if Selector == 5 and menublit == "true" then 
    screen:print(180,120,"Chord Chart  2", blue)
    end
    
    if selector == 6 and menublit == "true" then
    screen:print(180,130,"Tab Reader",blue)
    end
    
    
    --now if it goes higher then the options
    --its reset to the option on the opposite end
    
    if selector == 7 then
    selector = 1
    end
    
    if selector == 0 then
    selector = 6
    end
    
    --now we have our selections
    if pad:cross() and selector == 1 and menublit == "true" then
    menublit = "false"
    screen:clear()
    screen:blit(0,0,pent)
    end
    
    if pad:cross() and selector == 2 and menublit == "true" then
    menublit = "false"
    screen:clear()
    screen:blit(0,0,scale)
    end
    
    if pad:cross() and selector == 3 and menublit == "true" then
    menublit = "false"
    screen:clear()
    screen:blit(0,0,tuner)
    tunersel = "true"
    end
    
    if pad:cross() and selector == 4 and menublit == "true" then
    menublit = "false"
    screen:clear()
    screen:blit(0,0,chords1)
    end
    
    if pad:cross() and selector == 5 and menublit == "true" then
    menublit = "false"
    screen:clear()
    screen:blit(0,0,chords2)
    end
    
    
    --this should return us back
    --to the menu
    if pad:start() then
    menublit = "true"
    end
    
    
    --now for our tuner
    if tunersel == "true" and pad:cross() then
    elow:play()
    end
    
    if tunersel == "true" and pad:circle() then
    a:play()
    end
    
    if tunersel == "true" and pad:triangle() then
    d:play()
    end
    
    if tunersel == "true" and pad:square() then
    g:play()
    end
    
    if tunersel == "true" and pad:r() then
    b:play()
    end
    
    if tunersel == "true" and pad:l() then
    ehigh:play()
    end
    
    ---all done
    screen.waitVblankStart()
    screen.flip()
    end
    Geändert von GuitarGod1134 (12-27-2006 um 08:05 AM Uhr) Grund: Automerged Doublepost
    If you play WoW come find me on DOOMHAMMER (US) I am Human mage lvl 64 Atrana is the name (dont ask for runs!)
    Gold donations are highly appreciated!


 

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 .