Seite 61 von 342 ErsteErste ... 11 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 111 161 ... LetzteLetzte
Zeige Ergebnis 1.801 bis 1.830 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 bronxbomber92 d*m*, does any1 else know how to give only one chance to answer a question and either ...

  
  1. #1801
    sceKernelExitGame();
    Points: 19.955, Level: 89
    Level completed: 21%, Points required for next Level: 395
    Overall activity: 0%

    Registriert seit
    Jan 2006
    Ort
    New York
    Beiträge
    3.126
    Points
    19.955
    Level
    89
    Downloads
    0
    Uploads
    0

    Standard

    Zitat Zitat von bronxbomber92
    d*m*, does any1 else know how to give only one chance to answer a question and either restart the game if they get it wrong or go on to the next question if they get it correct?
    can anyone help me out here plz? thanks



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

    Zitat Zitat von natan333
    guys what do i replace if pad:circle() to make it attomatic so it moves by it self with out pressing a button ?
    Be alittle more precise and i think i can help :icon_wink .
    I dont really understand at the moment?
    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!

  3. #1803
    Is in your zone.
    Points: 24.342, Level: 94
    Level completed: 99%, Points required for next Level: 8
    Overall activity: 0%

    Registriert seit
    Oct 2005
    Ort
    Jacksonville, FL
    Beiträge
    3.429
    Points
    24.342
    Level
    94
    Downloads
    0
    Uploads
    0

    Standard

    Zitat Zitat von bronxbomber92
    can anyone help me out here plz? thanks
    post the code

    --XBL Gamertag: PhenoM904--

  4. #1804
    sceKernelExitGame();
    Points: 19.955, Level: 89
    Level completed: 21%, Points required for next Level: 395
    Overall activity: 0%

    Registriert seit
    Jan 2006
    Ort
    New York
    Beiträge
    3.126
    Points
    19.955
    Level
    89
    Downloads
    0
    Uploads
    0

    Standard

    ok here it is

    Code:
    green = Color.new(0, 255, 0)
    black = Color.new(0, 0, 0)
    red = Color.new(255, 0, 0)
    blue = Color.new(0, 0, 255)
    white = Color.new(255, 255, 255)
    
    
    -- Questions 1
    questionOne = "Who hit the most homeruns ever?"
    --answers 1
    answerOne = "down = Babe Ruth"
    answerTwo = "right = Hank Aaron"
    answerThree = "left = Barry Bond"
    answerFour = "up = Sammy Sosa"
    
    --****Main Loop****
    while true do
    screen:clear()
    pad = Controls.read()
    
    screen:print(80, 100, questionOne, blue)
    
    screen:print(150, 200, answerOne, white)
    
    screen:print(150, 215, answerTwo, white)
    
    screen:print(150, 230, answerThree, white)
    
    screen:print(150, 245, answerFour, white)
    
    if pad:down() then
    screen:print(150, 110, "sorry, incorrect.", red)
    end
    
    if pad:right() then
    screen:print(150, 110, "Your Correct!", green)
    end
    
    if pad:left() then
    screen:print(150, 110, "sorry, incorrect.", red)
    end
    
    if pad:up() then
    screen:print(150, 110, "sorry, incorrect.", red)
    end
    
    screen.flip()
    screen.waitVblankStart()
    end
    btw there isnt any bugs in it now, i just need to know wat i asked before...
    Geändert von Bronx (04-22-2006 um 08:25 AM Uhr)

  5. #1805
    Points: 5.745, Level: 48
    Level completed: 98%, Points required for next Level: 5
    Overall activity: 0%

    Registriert seit
    Jul 2005
    Beiträge
    404
    Points
    5.745
    Level
    48
    Downloads
    0
    Uploads
    0

    Standard

    Zitat Zitat von c5cha7
    Be alittle more precise and i think i can help :icon_wink .
    Code:
    sorry, i will try to be cool =P  (i love learning this)
    I dont really understand at the moment?
    I mean If i put this code
    Code:
    letterPos = {}
    letterPosx = 200
    letterPosy = 100
    
    while true do
    blue=Color.new(0,200,350)            
    screen:clear()
    pad = Controls.read()
    if pad:circle() then letterPosx = letterPosx + 2 end
    screen:print(letterPosx, letterPosy, "HELLO", blue)
    
    
    if pad:select() then
    break
    end
    screen.flip()
    screen.waitVblankStart()
    
    
    end
    the hello will only move right if a press the circle button becuase
    Code:
    if pad:circle() then letterPosx = letterPosx + 2 end
    is included.
    my question is: is there a code to replease the
    Code:
    if pad:circle() then letterPosx = letterPosx + 2 end
    to make it move right with out pressing any button ?
    Geändert von natan333 (04-22-2006 um 08:35 AM Uhr)
    Bequiet!!!
    I'm learning cc©cc

  6. #1806
    Points: 4.492, Level: 42
    Level completed: 72%, Points required for next Level: 58
    Overall activity: 0%

    Registriert seit
    Nov 2005
    Ort
    Minnesota, USA.
    Beiträge
    36
    Points
    4.492
    Level
    42
    Downloads
    0
    Uploads
    0

    Standard

    Natan333 -

    Do you mean that you just want the "HELLO" to move by itself? If so, then you just replace "pad:circle()" with "true". So the code would look like this.

    Code:
     
    letterPos = {}
    letterPosx = 200
    letterPosy = 100
     
    while true do 
    blue = Color.new(0,200,350)
     
    screen:clear()
     
    pad = Controls.read()
     
    if true then letterPosx = letterPosx + 2 end
    screen:print(letterPosx, letterPosy, "HELLO", blue)
     
    if pad:select() then
    break
    end
     
    screen.flip()
    screen.waitVblankStart()
     
    end

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

    Zitat Zitat von Jeffery
    Natan333 -

    Do you mean that you just want the "HELLO" to move by itself? If so, then you just replace "pad:circle()" with "true". So the code would look like this.

    Code:
     
    letterPos = {}
    letterPosx = 200
    letterPosy = 100
     
    while true do 
    blue = Color.new(0,200,350)
     
    screen:clear()
     
    pad = Controls.read()
     
    if true then letterPosx = letterPosx + 2 end
    screen:print(letterPosx, letterPosy, "HELLO", blue)
     
    if pad:select() then
    break
    end
     
    screen.flip()
    screen.waitVblankStart()
     
    end
    Argh...
    You beat me to it .
    but yea, i think he means that?
    unless you mean if you press select it
    will keep moving even is select isn't holded?
    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!

  8. #1808
    Points: 5.745, Level: 48
    Level completed: 98%, Points required for next Level: 5
    Overall activity: 0%

    Registriert seit
    Jul 2005
    Beiträge
    404
    Points
    5.745
    Level
    48
    Downloads
    0
    Uploads
    0

    Standard

    Thanks Jeffery , thats what i needed to know, If true is to move then false is to stop right ?
    like. if its moving, i plan to make it stop after 5 seconds, to do it i put something like
    Code:
    screen.waitVblankStart(50) False
    ?
    Bequiet!!!
    I'm learning cc©cc

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

    youd say something like:
    -- top of the script

    movehello = true


    if movehello == true then
    letterPosx = letterPosx + 2 end
    screenrint(letterPosx, letterPosy, "HELLO", blue)
    screen.waitVblankstart(50 )
    movehello = false
    end
    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

  10. #1810
    sceKernelExitGame();
    Points: 19.955, Level: 89
    Level completed: 21%, Points required for next Level: 395
    Overall activity: 0%

    Registriert seit
    Jan 2006
    Ort
    New York
    Beiträge
    3.126
    Points
    19.955
    Level
    89
    Downloads
    0
    Uploads
    0

    Question

    Zitat Zitat von bronxbomber92
    ok here it is

    Code:
    green = Color.new(0, 255, 0)
    black = Color.new(0, 0, 0)
    red = Color.new(255, 0, 0)
    blue = Color.new(0, 0, 255)
    white = Color.new(255, 255, 255)
    
    
    -- Questions 1
    questionOne = "Who hit the most homeruns ever?"
    --answers 1
    answerOne = "down = Babe Ruth"
    answerTwo = "right = Hank Aaron"
    answerThree = "left = Barry Bond"
    answerFour = "up = Sammy Sosa"
    
    --****Main Loop****
    while true do
    screen:clear()
    pad = Controls.read()
    
    screen:print(80, 100, questionOne, blue)
    
    screen:print(150, 200, answerOne, white)
    
    screen:print(150, 215, answerTwo, white)
    
    screen:print(150, 230, answerThree, white)
    
    screen:print(150, 245, answerFour, white)
    
    if pad:down() then
    screen:print(150, 110, "sorry, incorrect.", red)
    end
    
    if pad:right() then
    screen:print(150, 110, "Your Correct!", green)
    end
    
    if pad:left() then
    screen:print(150, 110, "sorry, incorrect.", red)
    end
    
    if pad:up() then
    screen:print(150, 110, "sorry, incorrect.", red)
    end
    
    screen.flip()
    screen.waitVblankStart()
    end
    btw there isnt any bugs in it now, i just need to know wat i asked before...
    PLZ help! all i want is to know how to move on to a new question if the question before that was answered correct?!?!?! can some1 plz help me?????

  11. #1811
    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 bronxbomber92
    PLZ help! all i want is to know how to move on to a new question if the question before that was answered correct?!?!?! can some1 plz help me?????

    u could have a function for each question. like:
    Code:
    function questionOne()
    
    -- your question code--
    THEN u could make a variable like:
    Code:
    questionanswered = false
    then, when the person preses up down, or whatever, u put:

    Code:
    questionanswered = true
    and then put:

    Code:
    if questionanswered == true then
    function questionTwo()
    end
    where function questionTwo() is your second question... and so on.

    hope i helped:)
    --------------------------------------------------------------------------------------

  12. #1812
    sceKernelExitGame();
    Points: 19.955, Level: 89
    Level completed: 21%, Points required for next Level: 395
    Overall activity: 0%

    Registriert seit
    Jan 2006
    Ort
    New York
    Beiträge
    3.126
    Points
    19.955
    Level
    89
    Downloads
    0
    Uploads
    0

    Standard

    Zitat Zitat von Grimfate126
    u could have a function for each question. like:
    Code:
    function questionOne()
    
    -- your question code--
    THEN u could make a variable like:
    Code:
    questionanswered = false
    then, when the person preses up down, or whatever, u put:

    Code:
    questionanswered = true
    and then put:

    Code:
    if questionanswered == true then
    function questionTwo()
    end
    where function questionTwo() is your second question... and so on.

    hope i helped:)
    ok get wat ur saying but how would i make questionOne when printed on the screen say the actual qustion? do u have msn messenger? wa it be possoble if u type up an example plz? thanks for ur help!

  13. #1813
    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 bronxbomber92
    ok get wat ur saying but how would i make questionOne when printed on the screen say the actual qustion? do u have msn messenger? wa it be possoble if u type up an example plz? thanks for ur help!
    my msn account is :

    [email protected]


    can u come on now?
    --------------------------------------------------------------------------------------

  14. #1814
    sceKernelExitGame();
    Points: 19.955, Level: 89
    Level completed: 21%, Points required for next Level: 395
    Overall activity: 0%

    Registriert seit
    Jan 2006
    Ort
    New York
    Beiträge
    3.126
    Points
    19.955
    Level
    89
    Downloads
    0
    Uploads
    0

    Standard

    yeah i can come on now!

    edit- mine is [email protected] add me
    Geändert von Bronx (04-22-2006 um 01:07 PM Uhr)

  15. #1815
    QJ Gamer Green
    Points: 5.046, Level: 45
    Level completed: 48%, Points required for next Level: 104
    Overall activity: 0%

    Registriert seit
    Jul 2005
    Ort
    Michigan
    Beiträge
    104
    Points
    5.046
    Level
    45
    Downloads
    0
    Uploads
    0

    Standard

    bronxbomber, the best way to do this is using arrays. The following example will proceed to the next question if correct and go back to question 1 if incorrect:

    Code:
    green = Color.new(0, 255, 0)
    black = Color.new(0, 0, 0)
    red = Color.new(255, 0, 0)
    blue = Color.new(0, 0, 255)
    white = Color.new(255, 255, 255)
    
    totalquestions=1
    
    questions = {}
    answerOne = {}
    answerTwo = {}
    answerThree = {}
    answerFour = {}
    correctanswer = {}
    questions[1] = "Who hit the most homeruns ever?"
    answerOne[1] = "down = Babe Ruth"
    answerTwo[1] = "right = Hank Aaron"
    answerThree[1] = "left = Barry Bond"
    answerFour[1] = "up = Sammy Sosa"
    correctanswer[1]=2
    
    i=1
    while i<=totalquestions do
        screen:clear()
        screen:print(80, 100, questions[i], blue)
        screen:print(150, 200, answerOne[i], white)
        screen:print(150, 215, answerTwo[i], white)
        screen:print(150, 230, answerThree[i], white)
        screen:print(150, 245, answerFour[i], white)
        inputreceived=0
        screen.flip()
        screen.waitVblankStart()
        while inputreceived==0 do
            pad = Controls.read()
    
            if pad:down() then
               screen.flip()
               if correctanswer[i]==1 then
                   screen:print(150, 110, "You're Correct!", green)
               else
                   screen:print(150, 110, "Sorry, incorrect.", red)
                   i=0
               end
               inputreceived=1
            end
            
            if pad:right() then
               screen.flip()
               if correctanswer[i]==2 then
                   screen:print(150, 110, "You're Correct!", green)
               else
                   screen:print(150, 110, "Sorry, incorrect.", red)
                   i=0
               end
               inputreceived=1
            end
            
            if pad:left() then
               screen.flip()
               if correctanswer[i]==3 then
                   screen:print(150, 110, "You're Correct!", green)
               else
                   screen:print(150, 110, "Sorry, incorrect.", red)
                   i=0
               end
               inputreceived=1
            end
            
            if pad:up() then
               screen.flip()
               if correctanswer[i]==4 then
                   screen:print(150, 110, "You're Correct!", green)
               else
                   screen:print(150, 110, "Sorry, incorrect.", red)
                   i=0
               end
               inputreceived=1
            end
        end
        i = i+1
        screen.flip()
        screen.waitVblankStart(120)
    end
    Edit: Edited so that there's a 2-second delay before loading the next question, allowing for seeing whether the answer was right or not.

    Edit again: I have no idea why that huge space is showing up between "12" and "0"

    Edit again: Forgot to initialize the arrays.
    Geändert von darkshadow88 (04-22-2006 um 06:15 PM Uhr)
    [QUOTE=Gutya]I think it's getting a bit stupid people posting 'I don't know' or 'I've never messed with that before', it's a waste of time. It's like buzzing in on a quizshow only to say 'I dunno...'.[/QUOTE]

  16. #1816
    sceKernelExitGame();
    Points: 19.955, Level: 89
    Level completed: 21%, Points required for next Level: 395
    Overall activity: 0%

    Registriert seit
    Jan 2006
    Ort
    New York
    Beiträge
    3.126
    Points
    19.955
    Level
    89
    Downloads
    0
    Uploads
    0

    Standard

    Zitat Zitat von darkshadow88
    bronxbomber, the best way to do this is using arrays. The following example will proceed to the next question if correct and go back to question 1 if incorrect:

    Code:
    green = Color.new(0, 255, 0)
    black = Color.new(0, 0, 0)
    red = Color.new(255, 0, 0)
    blue = Color.new(0, 0, 255)
    white = Color.new(255, 255, 255)
    
    questions[1] = "Who hit the most homeruns ever?"
    answerOne[1] = "down = Babe Ruth"
    answerTwo[1] = "right = Hank Aaron"
    answerThree[1] = "left = Barry Bond"
    answerFour[1] = "up = Sammy Sosa"
    correctanswer[1]=2
    
    i=1
    while true do
        screen:clear()
        screen:print(80, 100, questions[i], blue)
        screen:print(150, 200, answerOne[i], white)
        screen:print(150, 215, answerTwo[i], white)
        screen:print(150, 230, answerThree[i], white)
        screen:print(150, 245, answerFour[i], white)
        inputreceived=0
        screen.waitVblankStart()
        screen.flip()
        while inputreceived==0 do
            pad = Controls.read()
    
            if pad:down() then
               screen.flip()
               if correctanswer[i]==1 then
                   screen:print(150, 110, "You're Correct!", green)
               else
                   screen:print(150, 110, "Sorry, incorrect.", red)
                   i=0
               end
               inputreceived=1
            end
            
            if pad:right() then
               screen.flip()
               if correctanswer[i]==2 then
                   screen:print(150, 110, "You're Correct!", green)
               else
                   screen:print(150, 110, "Sorry, incorrect.", red)
                   i=0
               end
               inputreceived=1
            end
            
            if pad:left() then
               screen.flip()
               if correctanswer[i]==3 then
                   screen:print(150, 110, "You're Correct!", green)
               else
                   screen:print(150, 110, "Sorry, incorrect.", red)
                   i=0
               end
               inputreceived=1
            end
            
            if pad:up() then
               screen.flip()
               if correctanswer[i]==4 then
                   screen:print(150, 110, "You're Correct!", green)
               else
                   screen:print(150, 110, "Sorry, incorrect.", red)
                   i=0
               end
               inputreceived=1
            end
        end
        i = i+1
        screen.waitVblankStart()
        screen.flip()
    end
    wow i had no idea how to do that! could u possibly explain that for me in a pm? thanks a lot!

  17. #1817
    Points: 5.745, Level: 48
    Level completed: 98%, Points required for next Level: 5
    Overall activity: 0%

    Registriert seit
    Jul 2005
    Beiträge
    404
    Points
    5.745
    Level
    48
    Downloads
    0
    Uploads
    0

    Standard

    Zitat Zitat von Glynnder- PSPro
    youd say something like:
    -- top of the script

    movehello = true


    if movehello == true then
    letterPosx = letterPosx + 2 end
    screenrint(letterPosx, letterPosy, "HELLO", blue)
    screen.waitVblankstart(50 )
    movehello = false
    end
    Code:
    letterPos = {}
    letterPosx = 200
    letterPosy = 100
    
    while true do 
    blue = Color.new(0,200,350)
    movehello = true
    screen:clear()
    pad = Controls.read()
    
    
    if movehello == true then letterPosx = letterPosx + 2 end
    screen:print(letterPosx, letterPosy, "HELLO", blue)
    screen.waitVblankStart(50)
    movehello = false
    
    
    if pad:select() then
    break
    end
     
    screen.flip()
    screen.waitVblankStart()
     
    end
    1st it takes the 50 to appear the word, 2nd it takes 50 to move each 2 pixel.
    the thing is that "screen.waitVblankStart(5 0)" work for the word and the false , is there a way to make "screen.waitVblankStart(5 0)" separate from the HELLo word and Work only for the False ?
    can you correct it please? so it starts normally and stops at 50
    Geändert von natan333 (04-23-2006 um 12:40 PM Uhr)
    Bequiet!!!
    I'm learning cc©cc

  18. #1818
    Points: 5.745, Level: 48
    Level completed: 98%, Points required for next Level: 5
    Overall activity: 0%

    Registriert seit
    Jul 2005
    Beiträge
    404
    Points
    5.745
    Level
    48
    Downloads
    0
    Uploads
    0

    Standard

    Guys i have a question: there is a kinda of a circle object, but the hole image is a square, the white is outside of the circle and blue is inside the circle. I saw some pictures that is a circle ones, and the outside of the circle have a color to make it invisivel (like make the outside bellow of any picture that comes), so other colors can go above it and repleace the white with other picture above it
    . what could the Hue, Sat, Lum, Red, Green, Blue could be ?
    Geändert von natan333 (04-23-2006 um 04:01 PM Uhr)
    Bequiet!!!
    I'm learning cc©cc

  19. #1819
    Developer
    Points: 7.499, Level: 57
    Level completed: 75%, Points required for next Level: 51
    Overall activity: 0%

    Registriert seit
    Mar 2006
    Ort
    Guadalajara
    Beiträge
    958
    Points
    7.499
    Level
    57
    Downloads
    0
    Uploads
    0

    Standard

    Zitat Zitat von JOVENASO
    ok i ask if is posible to make 2 buttons make one fuction ..... example press cross and square at the same time and that will make a break or do something ... like on umd loadder
    I want to know that!!!!!!!!

    Current projects:
    • pspshootoutsv0.4
    • PSPIRATESv6 :D
    • Kindom Hearths: Sora´s Adventure V0.2
    • PSPirates Alarm Clock v0.3
    • Changos!: fall of the army-ITS ALIVE AND WORKING (coming soon)

    PSPMEX DevTeam.

  20. #1820
    Quality Haxing Since 1991
    Points: 29.255, Level: 99
    Level completed: 55%, Points required for next Level: 745
    Overall activity: 0%

    Registriert seit
    Oct 2005
    Ort
    Pennsylvania, USA Fi
    Beiträge
    6.206
    Points
    29.255
    Level
    99
    Downloads
    0
    Uploads
    0

    Standard

    Zitat Zitat von MEXICANSNAKE
    I want to know that!!!!!!!!
    Yes...it's really easy....
    Code:
    pad=Controls.read()
    if pad:cross() and pad:circle() then
    do something
    end
    That will make it so that if X and O are pressed at the same time, and ONLY if they are pressed at the same time, it will do something. It works with any button combnation and also with more than 2 buttons. For example:
    Code:
    pad=Controls.read()
    if pad:cross() and pad:circle() and pad:square() and pad:triangle() and pad:up() and pad:down() and pad:left() and pad:right() and pad:l() and pad:r() and pad:start() then
    do something
    end
    also works.
    Zitat Zitat von Noriko
    I would call you gay but I love you.


    Wait ...huh.



  21. #1821
    Points: 5.745, Level: 48
    Level completed: 98%, Points required for next Level: 5
    Overall activity: 0%

    Registriert seit
    Jul 2005
    Beiträge
    404
    Points
    5.745
    Level
    48
    Downloads
    0
    Uploads
    0

    Standard

    can some edit this code
    Code:
    letterPos = {}
    letterPosx = 200
    letterPosy = 100
    
    blahblah = Font.createProportional()
    blahblah:setPixelSizes(0, 32)
    
    while true do
    blue=Color.new(0,200,350)              
    screen:clear()
    pad = Controls.read()
    
    analogX = pad:analogX()
    analogY = pad:analogY()
    
    if analogX > 80 then letterPosx = letterPosx + 3 end
    if analogX < -80 then letterPosx = letterPosx - 3 end
    if analogY > -80 then letterPosy = letterPosy + 3 end
    if analogY < 80 then letterPosy = letterPosy - 3 end
    
    screen:fontPrint(blahblah, letterPosx, letterPosy, "Hello", blue)
    
    if pad:select() then
    break
    end
    screen.flip()
    screen.waitVblankStart()
    
    end
    and make the hello move smooth ?
    thx
    between, can someone also edit the code below and show how can i make the font change from 32 to 40 when press L trigger? ( I tried to add L trigger at "font create" and "set pixel", it only gave me a error =( )
    Geändert von natan333 (04-23-2006 um 07:10 PM Uhr)
    Bequiet!!!
    I'm learning cc©cc

  22. #1822
    Developer
    Points: 7.499, Level: 57
    Level completed: 75%, Points required for next Level: 51
    Overall activity: 0%

    Registriert seit
    Mar 2006
    Ort
    Guadalajara
    Beiträge
    958
    Points
    7.499
    Level
    57
    Downloads
    0
    Uploads
    0

    Talking

    Zitat Zitat von PSPHax0r9
    Yes...it's really easy....
    Code:
    pad=Controls.read()
    if pad:cross() and pad:circle() then
    do something
    end
    That will make it so that if X and O are pressed at the same time, and ONLY if they are pressed at the same time, it will do something. It works with any button combnation and also with more than 2 buttons. For example:
    Code:
    pad=Controls.read()
    if pad:cross() and pad:circle() and pad:square() and pad:triangle() and pad:up() and pad:down() and pad:left() and pad:right() and pad:l() and pad:r() and pad:start() then
    do something
    end
    also works.
    thanx guy i really need that to use it with my shootouts game!!!

    Current projects:
    • pspshootoutsv0.4
    • PSPIRATESv6 :D
    • Kindom Hearths: Sora´s Adventure V0.2
    • PSPirates Alarm Clock v0.3
    • Changos!: fall of the army-ITS ALIVE AND WORKING (coming soon)

    PSPMEX DevTeam.

  23. #1823
    Points: 5.745, Level: 48
    Level completed: 98%, Points required for next Level: 5
    Overall activity: 0%

    Registriert seit
    Jul 2005
    Beiträge
    404
    Points
    5.745
    Level
    48
    Downloads
    0
    Uploads
    0

    Standard

    Guys, wast this supposed to work ?
    Code:
    letterPos = {}
    letterPosx = 200
    letterPosy = 100
    
    -----------------------------------------------
    puffa = Font.createProportional()
    puffa:setPixelSizes(0, 32)
    -----------------------------------------------
    
    while true do
    blue=Color.new(0,200,350)              
    screen:clear()
    pad = Controls.read()
    
    -----------------------------------------------
    if pad:r() blahblah = puffa then 
    end
    -----------------------------------------------
    
    analogX = pad:analogX()
    analogY = pad:analogY()
    
    if analogX > 80 then letterPosx = letterPosx + 3 end
    if analogX < -80 then letterPosx = letterPosx - 3 end
    if analogY > -80 then letterPosy = letterPosy + 3 end
    if analogY < 80 then letterPosy = letterPosy - 3 end
    
    screen:fontPrint(blahblah, letterPosx, letterPosy, "Hello", blue)
    
    if pad:select() then
    break
    end
    screen.flip()
    screen.waitVblankStart()
    
    end
    The thing i want to do is to make the Hello size change only if i press R button.
    i think it will have to use true and false codes
    can anybody show me how to do it ?
    Geändert von natan333 (04-24-2006 um 05:48 AM Uhr)
    Bequiet!!!
    I'm learning cc©cc

  24. #1824
    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

    onething to remember with the:
    pad=Controls.read()
    if pad:cross() and pad:circle() then
    do something
    end

    is that if you have another script that uses pad:cross() then say
    if pad:cross() and not pad:circle() then
    other script here
    end
    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

  25. #1825
    Points: 5.745, Level: 48
    Level completed: 98%, Points required for next Level: 5
    Overall activity: 0%

    Registriert seit
    Jul 2005
    Beiträge
    404
    Points
    5.745
    Level
    48
    Downloads
    0
    Uploads
    0

    Standard

    Code:
    letterPos = {}
    letterPosx = 200
    letterPosy = 100
    
    blahblah = Font.createProportional()
    blahblah:setPixelSizes(0, 20)
    
    while true do
    blue=Color.new(0,200,350)              
    screen:clear()
    pad = Controls.read()
    
    if pad:r() then blahblah:setPixelSizes(0, + 20) end
    
    analogX = pad:analogX()
    analogY = pad:analogY()
    
    if analogX > 80 then letterPosx = letterPosx + 3 end
    if analogX < -80 then letterPosx = letterPosx - 3 end
    if analogY > -80 then letterPosy = letterPosy + 3 end
    if analogY < 80 then letterPosy = letterPosy - 3 end
    
    screen:fontPrint(blahblah, letterPosx, letterPosy, "Hello", blue)
    
    if pad:select() then
    break
    end
    screen.flip()
    screen.waitVblankStart()
    
    end
    i though this was the right code for R trigger to add 20 font to the Hello word so the font will change it to 40 and pressing R trigger again to give me font 60, but it gives me error :Cry:
    can somebody help me pls?
    Geändert von natan333 (04-24-2006 um 10:49 AM Uhr)
    Bequiet!!!
    I'm learning cc©cc

  26. #1826
    Points: 5.745, Level: 48
    Level completed: 98%, Points required for next Level: 5
    Overall activity: 0%

    Registriert seit
    Jul 2005
    Beiträge
    404
    Points
    5.745
    Level
    48
    Downloads
    0
    Uploads
    0

    Standard

    i have another question:
    Code:
    letterPos = {}
    letterPosx = 200
    letterPosy = 100
    
    blahblah = Font.createProportional()
    blahblah:setPixelSizes(0, 20)
    
    
    while true do
    blue=Color.new(0,200,350)              
    screen:clear()
    pad = Controls.read()
    
    ----------------------------------------------
    if pad:r() then
    screen:clear()
    screen:print(194,136, "Blue Team Wins", blue)
    screen.flip()
    screen:print(240,250, "Press Select to Exit", blue)
    screen.flip()
    screen.waitVblankStart(50)
    end
    -----------------------------------------------
    
    analogX = pad:analogX()
    analogY = pad:analogY()
    
    if analogX > 80 then letterPosx = letterPosx + 3 end
    if analogX < -80 then letterPosx = letterPosx - 3 end
    if analogY > -80 then letterPosy = letterPosy + 3 end
    if analogY < 80 then letterPosy = letterPosy - 3 end
    
    screen:fontPrint(blahblah, letterPosx, letterPosy, "Hello", blue)
    
    if pad:select() then
    break
    end
    screen.flip()
    screen.waitVblankStart()
    
    end
    how can i make the "screen.waitVblankStart(5 0)" work only inside the ------ lines?
    and not slow down the moving "Hello" word when you move it with the analog stick ?
    i m trying to do this sinse i 1st stared studing this but still cant figure it out how
    Bequiet!!!
    I'm learning cc©cc

  27. #1827
    QJ Gamer Green
    Points: 40.380, Level: 100
    Level completed: 0%, Points required for next Level: 0
    Overall activity: 0%

    Registriert seit
    Apr 2006
    Ort
    Grand Line
    Beiträge
    5.996
    Points
    40.380
    Level
    100
    Downloads
    0
    Uploads
    0

    Standard

    how to you code AI in Lua? (for a side scroller)
    [CENTER][IMG]http://img130.imageshack.us/img130/1640/acefcbanner2wo9.gif[/IMG]
    [SIZE=1][B]I'm soo hot[/B][/SIZE]
    [/CENTER]
    [SIZE=2][CENTER][/SIZE][/CENTER]
    [center]Sorry. No Advertising[/center]

  28. #1828
    sceKernelExitGame();
    Points: 19.955, Level: 89
    Level completed: 21%, Points required for next Level: 395
    Overall activity: 0%

    Registriert seit
    Jan 2006
    Ort
    New York
    Beiträge
    3.126
    Points
    19.955
    Level
    89
    Downloads
    0
    Uploads
    0

    Standard

    Zitat Zitat von <
    how to you code AI in Lua? (for a side scroller)
    yeah i would like to know that also?!?!

  29. #1829
    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 bronxbomber92
    yeah i would like to know that also?!?!
    me 2!
    --------------------------------------------------------------------------------------

  30. #1830
    QJ Gamer Green
    Points: 4.779, Level: 44
    Level completed: 15%, Points required for next Level: 171
    Overall activity: 0%

    Registriert seit
    Apr 2006
    Beiträge
    25
    Points
    4.779
    Level
    44
    Downloads
    0
    Uploads
    0

    Standard need help fast

    i need to make the background of a png image transparent is this possible and if so how do i do 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:52 AM Uhr.

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