Seite 60 von 342 ErsteErste ... 10 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 110 160 ... LetzteLetzte
Zeige Ergebnis 1.771 bis 1.800 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; whats the code?sounds like you have too many or not enough "end" statments also I was messing around with the ...

  
  1. #1771
    QJ Gamer Blue
    Points: 5.631, Level: 48
    Level completed: 41%, Points required for next Level: 119
    Overall activity: 0%

    Registriert seit
    Jun 2005
    Beiträge
    375
    Points
    5.631
    Level
    48
    Downloads
    0
    Uploads
    0

    Standard

    whats the code?sounds like you have too many or not enough "end" statments

    also I was messing around with the code for the analog stick so i figured id post it here incase someone learning how to use the analog stick wants to use it


    Code:
    white = Color.new(255, 255, 255)
    
    while true do
    screen:clear()
    	pad = Controls.read()
    	analogX = pad:analogX()
    	analogY = pad:analogY()
    	if pad:start() then
    		break
    	end
    
    --Up/Down/Left/Right
    		--Right
    	if analogX > 32 and analogY > -40 and analogY < 40 then
    		screen:print(200, 100, "Right", white)
    	end
    		--Left
    	if analogX < -32 and analogY > -40 and analogY < 40 then
    		screen:print(200, 100, "Left", white)
    	end
    		--Down
    	if analogY > 32 and analogX < 40 and analogX > -40 then
    		screen:print(200, 100, "Down", white)
    	end
    		--Up
    	if analogY < -32 and analogX < 40 and analogX >-40 then
    		screen:print(200, 100, "Up", white)
    	end
    		--Center
    	if analogY > -32 and analogY <32 and analogX < 32 and analogX > -32 then
    		screen:print(200, 100, "Center", white)
    	end
    
    --Diagnals
    		--Up/Right
    	if analogY < -32 and analogX > 40 then
    		screen:print(200, 100, "Up and Right", white)
    	end
    		--Up/Left
    	if analogY < -32 and analogX < -40 then
    		screen:print(200, 100, "Up and Left", white)
    	end
    		--Down/Right
    	if analogY > 32 and analogX > 40 then
    		screen:print(200, 100, "Down and Right", white)
    	end
    		--Down/Left
    	if analogY > 32 and analogX < -40 then
    		screen:print(200, 100, "Down and Left", white)
    	end
    
    
    
    
    screen.flip()
    end



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

    I fixed it for him, when he PMed me about it ;)


  3. #1773
    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 TeamOverload
    I fixed it for him, when he PMed me about it ;)
    yeah thanks! i appreciate it!

  4. #1774
    Points: 24.247, Level: 94
    Level completed: 90%, Points required for next Level: 103
    Overall activity: 0%

    Registriert seit
    Jul 2005
    Ort
    texas
    Beiträge
    2.803
    Points
    24.247
    Level
    94
    Downloads
    0
    Uploads
    0

    Standard

    Dont make your games online. Period. Right now, LUA only supports TCP. TCP is slow, all/most online games use UDP because its much faster. I got a TCP server on my computer to talk to my PSP as a test for netlib. It was wasy too slow (although much faster than the current netlib.)

    If I can ever get UDP with netlib, making an online game is a good idea.

    However, if I continue to devolop netlib with TCP, it would be useful for things like online scores and stuff that you send once. Right now, netlib has to connect every time you want to send data, and failing to connect and getting stuck in luaplayer is common.

    (And to the person who said you need netlib to make an online game, you dont. You use the Wlan. functions)
    牧来栠摩琠敨映汩獥
    PSN: youresam
    From Earth the Frozen Ipaqs shall rise and be silenced and all will live free.
    --Mike Hollingsworth

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

    could some1 tell me wat is wrong with my end statements? thanks!

    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(0, 0, 0)
    
    -- ********Variables******
    downPressed = answerOne
    upPressed = answerFour
    rightPressed = answerTwo
    leftPressed = answerThree
    
    -- 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(100, 100, questionOne, blue)
    screen.flip()
    end
    screen:print(150, 250, answerOne, white)
    screen.flip()
    end
    screen:print(150, 255, answerTwo, white)
    screen.flip()
    end
    screen:print(150, 260, answerThree, white)
    screen.flip()
    end
    screen:print(150, 265, answerFour, white)
    screen.flip()
    end
    if pad:down() then
    screen:print(150, 300, 'sorry, incorrect.', left)
    screen.flip()
    end
    if pad:right() then
    screen:print(150, 300, 'Your Correct!', green)
    screen.flip()
    end
    if pad:left() then
    screen:print(150, 300, 'sorry, incorrect.', left)
    screen.flip()
    end
    if pad:up() then
    screen:print(150, 300, 'sorry, incorrect.', left)
    screen.filp()
    end
    while true do
    screen.flip()
    screen.waitVblankStart()
    end
    BTW- if u find anything else wrong feel free to say! lol

  6. #1776
    &lt;img src=&quot;images/smilies/psp.gif&quot; border=&quot;0&quot; alt=&quot;&quot; title=&quot;&quot; cl***=&quot;inlineimg&quot; /&gt; &lt;img src=&quot;images/smilies/Punk.gif&quot; border=&quot;0&quot; alt=&quot;&quot; title=&quot;&quot; cl***=&
    Points: 11.105, Level: 69
    Level completed: 64%, Points required for next Level: 145
    Overall activity: 0%

    Registriert seit
    Jun 2005
    Ort
    Canada
    Beiträge
    1.944
    Points
    11.105
    Level
    69
    Downloads
    0
    Uploads
    0

    Standard

    you have too many of them,,
    you dont need an end after screenflip, or print

    EDIT, you also have an extra while true do statement that you dont need,,

    To check if your ends are correct download NotePad++
    itll connect everything, and colour the reserved words,it perfect
    Geändert von Sousanator (04-21-2006 um 03:18 PM Uhr)

  7. #1777
    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 Sousanator
    you have too many of them,,
    you dont need an end after screenflip, or print

    EDIT, you also have an extra while true do statement that you dont need,,

    To check if your ends are correct download NotePad++
    itll connect everything, and colour the reserved words,it perfect
    thanks! but now i cant get the answers to appear!

  8. #1778
    &lt;img src=&quot;images/smilies/psp.gif&quot; border=&quot;0&quot; alt=&quot;&quot; title=&quot;&quot; cl***=&quot;inlineimg&quot; /&gt; &lt;img src=&quot;images/smilies/Punk.gif&quot; border=&quot;0&quot; alt=&quot;&quot; title=&quot;&quot; cl***=&
    Points: 11.105, Level: 69
    Level completed: 64%, Points required for next Level: 145
    Overall activity: 0%

    Registriert seit
    Jun 2005
    Ort
    Canada
    Beiträge
    1.944
    Points
    11.105
    Level
    69
    Downloads
    0
    Uploads
    0

    Standard

    try taking away all the screenflips, except the one at the very end

    ohh, and you spelled screenflip wrong on your second last statement
    (you put screenfilp)

  9. #1779
    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 Sousanator
    you have too many of them,,
    you dont need an end after screenflip, or print

    EDIT, you also have an extra while true do statement that you dont need,,

    To check if your ends are correct download NotePad++
    itll connect everything, and colour the reserved words,it perfect
    which one? and this is the code i have now, it works, kinda... i cant get the answers to show!? any help

    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(0, 0, 0)
    
    -- ********Variables******
    downPressed = answerOne
    upPressed = answerFour
    rightPressed = answerTwo
    leftPressed = answerThree
    
    -- 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(100, 100, questionOne, blue)
    screen.flip()
    end
    screen:print(150, 250, answerOne, white)
    screen.flip()
    screen:print(150, 255, answerTwo, white)
    screen.flip()
    screen:print(150, 260, answerThree, white)
    screen.flip()
    screen:print(150, 265, answerFour, white)
    screen.flip()
    if pad:down() then
    screen:print(150, 300, 'sorry, incorrect.', left)
    screen.flip()
    end
    if pad:right() then
    screen:print(150, 300, 'Your Correct!', green)
    screen.flip()
    end
    if pad:left() then
    screen:print(150, 300, 'sorry, incorrect.', left)
    screen.flip()
    end
    if pad:up() then
    screen:print(150, 300, 'sorry, incorrect.', left)
    screen.flip()
    end
    while true do
    screen.flip()
    screen.waitVblankStart()
    end

  10. #1780
    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 Sousanator
    try taking away all the screenflips, except the one at the very end

    ohh, and you spelled screenflip wrong on your second last statement
    (you put screenfilp)
    let me try...

    btw- sry for double post...

    EDIT- ok i tried this code but no text appears...

    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(0, 0, 0)
    
    -- ********Variables******
    downPressed = answerOne
    upPressed = answerFour
    rightPressed = answerTwo
    leftPressed = answerThree
    
    -- 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()
    end
    pad = Controls.read()
    
    screen:print(100, 100, questionOne, blue)
    screen:print(150, 250, answerOne, white)
    screen:print(150, 255, answerTwo, white)
    screen:print(150, 260, answerThree, white)
    screen:print(150, 265, answerFour, white)
    if pad:down() then
    screen:print(150, 300, 'sorry, incorrect.', left)
    end
    if pad:right() then
    screen:print(150, 300, 'Your Correct!', green)
    end
    if pad:left() then
    screen:print(150, 300, 'sorry, incorrect.', left)
    end
    if pad:up() then
    screen:print(150, 300, 'sorry, incorrect.', left)
    end
    while true do
    screen.waitVblankStart()
    end
    Geändert von Bronx (04-21-2006 um 03:34 PM Uhr)

  11. #1781
    &lt;img src=&quot;images/smilies/psp.gif&quot; border=&quot;0&quot; alt=&quot;&quot; title=&quot;&quot; cl***=&quot;inlineimg&quot; /&gt; &lt;img src=&quot;images/smilies/Punk.gif&quot; border=&quot;0&quot; alt=&quot;&quot; title=&quot;&quot; cl***=&
    Points: 11.105, Level: 69
    Level completed: 64%, Points required for next Level: 145
    Overall activity: 0%

    Registriert seit
    Jun 2005
    Ort
    Canada
    Beiträge
    1.944
    Points
    11.105
    Level
    69
    Downloads
    0
    Uploads
    0

    Standard

    here i rewrote your code,,
    some problems you had were, white was actually black, and you mixed up the up/down, and left/right posistios,,
    i didnt fix the positions, so its cluttered a bit,, ill let you fix that

    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(100, 100, questionOne, blue)
    
    screen:print(150, 250, answerOne, white)
    
    screen:print(150, 255, answerTwo, white)
    
    screen:print(150, 260, answerThree, white)
    
    screen:print(150, 265, answerFour, white)
    
    if pad:down() then
    screen:print(150, 100, "sorry, incorrect.", red)
    end
    
    if pad:right() then
    screen:print(150, 100, "Your Correct!", green)
    end
    
    if pad:left() then
    screen:print(150, 100, "sorry, incorrect.", red)
    end
    
    if pad:up() then
    screen:print(150, 100, "sorry, incorrect.", red)
    end
    
    screen.flip()
    screen.waitVblankStart()
    end

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

    thanks! i appreciate ur help! and with notepad++ how do u find out wat each color means that it highlights?

  13. #1783
    &lt;img src=&quot;images/smilies/psp.gif&quot; border=&quot;0&quot; alt=&quot;&quot; title=&quot;&quot; cl***=&quot;inlineimg&quot; /&gt; &lt;img src=&quot;images/smilies/Punk.gif&quot; border=&quot;0&quot; alt=&quot;&quot; title=&quot;&quot; cl***=&
    Points: 11.105, Level: 69
    Level completed: 64%, Points required for next Level: 145
    Overall activity: 0%

    Registriert seit
    Jun 2005
    Ort
    Canada
    Beiträge
    1.944
    Points
    11.105
    Level
    69
    Downloads
    0
    Uploads
    0

    Standard

    you go to language > style configerator(the last one) > then in language choose lua, and you will see what each colour means

  14. #1784
    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 , i know u have helped me a lot! but do u know how to stop it show u only get one try to answer it then u move on to the next question (once i have a new question, lol)!btw i appreciate all ur help!

  15. #1785
    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 someone show me a code to move words pls? like there is a word Hello in the black screen and if i press Circle it will move right
    it will really help
    Bequiet!!!
    I'm learning cc©cc

  16. #1786
    &lt;img src=&quot;images/smilies/psp.gif&quot; border=&quot;0&quot; alt=&quot;&quot; title=&quot;&quot; cl***=&quot;inlineimg&quot; /&gt; &lt;img src=&quot;images/smilies/Punk.gif&quot; border=&quot;0&quot; alt=&quot;&quot; title=&quot;&quot; cl***=&
    Points: 11.105, Level: 69
    Level completed: 64%, Points required for next Level: 145
    Overall activity: 0%

    Registriert seit
    Jun 2005
    Ort
    Canada
    Beiträge
    1.944
    Points
    11.105
    Level
    69
    Downloads
    0
    Uploads
    0

    Standard

    @bronxbomber92, im not sure how to do that,, at least not easily

    @natan333 make some new varibles

    letterPos = {}
    letterPos.x = (starting point, x posistion)
    letterPos.y = (starting point, y position)

    then when you screenrint you do this,,
    screenrint(letterPos.x, letterPos.y, "blaa", white)

    then you do this
    if pad:circle() then letterPos.x = letterPos.x + 2 end

    if you wanted it to move left, change + to -,,
    and if you wanted to move it up/down you subtract/add letterPos.y

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

    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?

  18. #1788
    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:
    while true do
    blue=Color.new(0,200,350)          
    screen:clear()
    letterPos = {}
    letterPosx = 200, 250
    letterPosy = 100, 150
    screen:print(letterPosx, letterPosy, "HELLO", blue)
    pad = Controls.read()
    if pad:circle() then letterPosx = letterPosx + 2 end
    
    
    if pad:select() then
    break
    end
    screen.flip()
    screen.waitVblankStart()
    
    
    end
    whats wrong with this code? It dosent give no error but Circle dosent make it move =/
    Bequiet!!!
    I'm learning cc©cc

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

    Get rid of the array and you should be set. and have only 1 value per variable

    --XBL Gamertag: PhenoM904--

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

    what do u mean by array ? and the 1 per variable you mean letterPosx + 2 to be + 1 or letterPosx = 200, 1 ?
    Bequiet!!!
    I'm learning cc©cc

  21. #1791
    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 natan333
    Code:
    while true do
    blue=Color.new(0,200,350)          
    screen:clear()
    letterPos = {}
    letterPosx = 200, 250
    letterPosy = 100, 150
    screen:print(letterPosx, letterPosy, "HELLO", blue)
    pad = Controls.read()
    if pad:circle() then letterPosx = letterPosx + 2 end
    
    
    if pad:select() then
    break
    end
    screen.flip()
    screen.waitVblankStart()
    
    
    end
    whats wrong with this code? It dosent give no error but Circle dosent make it move =/

    also, your screen.waitVblankStart() should come BEFORE your screen:flip()
    --------------------------------------------------------------------------------------

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

    is it possible for you to put the code showing the correct way ?
    Bequiet!!!
    I'm learning cc©cc

  23. #1793
    Developer
    Points: 6.074, Level: 50
    Level completed: 62%, Points required for next Level: 76
    Overall activity: 0%

    Registriert seit
    Sep 2005
    Beiträge
    270
    Points
    6.074
    Level
    50
    Downloads
    0
    Uploads
    0

    Standard

    This is my problem:
    a = 2
    b = a - 1.
    tempa = a
    a = b
    b = tempa

    somehow, they both equal one, instead of a = 1 and b = 2.

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

    Code:
    while true do
    blue=Color.new(0,200,350)          
    screen:clear()
    letterPosx = 200
    letterPosy = 100
    screen:print(letterPosx, letterPosy, "HELLO", blue)
    pad = Controls.read()
    if pad:circle() then letterPosx = letterPosx + 5 end
    
    
    if pad:select() then
    break
    end
    screen.flip()
    screen.waitVblankStart()
    
    
    end
    Try that. and the array was the letterPos={} thing.

    --XBL Gamertag: PhenoM904--

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

    Ok I got it working, Moving =P but if i release the button , it comes back =/
    Code:
    while true do
    blue=Color.new(0,200,350)          
    screen:clear()
    
    letterPosx = 200, 200
    letterPosy = 150, 150
    pad = Controls.read()
    if pad:cross() then letterPosx = letterPosx + 10 end
    screen:print(letterPosx, letterPosy, "HELLO", blue)
    
    
    
    if pad:select() then
    break
    end
    screen.waitVblankStart()
    screen.flip()
    
    
    
    end
    what do i do to make it stay ?
    Bequiet!!!
    I'm learning cc©cc

  26. #1796
    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 natan333
    Ok I got it working, Moving =P but if i release the button , it comes back =/
    Code:
    while true do
    blue=Color.new(0,200,350)          
    screen:clear()
    
    letterPosx = 200, 200
    letterPosy = 150, 150
    pad = Controls.read()
    if pad:cross() then letterPosx = letterPosx + 10 end
    screen:print(letterPosx, letterPosy, "HELLO", blue)
    
    
    
    if pad:select() then
    break
    end
    screen.waitVblankStart()
    screen.flip()
    
    
    
    end
    what do i do to make it stay ?
    try this:

    Code:
    blue = Color.new(0,200,350)
    
    letterPosx = 200
    letterPosy = 150
    
    while true do
    
    pad = Controls.read()
    
    screen:print(letterPosx, letterPosy, "HELLO", blue)
    
    if pad:cross() then
    screen:clear()
    letterPosx = letterPosx + 10 
    end
    
    
    if pad:select() then
    break
    end
    
    screen.waitVblankStart()
    screen.flip()
    end
    it should work
    --------------------------------------------------------------------------------------

  27. #1797
    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

    yeah i learned now =PPPPPP Thanks Guys
    now i have to learn how to make it attomatic
    i saw source of an example of moving Hello Word, and it has Time in there, but have no idea how to change the pad to move attomatic =P
    Geändert von natan333 (04-21-2006 um 09:12 PM Uhr)
    Bequiet!!!
    I'm learning cc©cc

  28. #1798
    Developer
    Points: 6.074, Level: 50
    Level completed: 62%, Points required for next Level: 76
    Overall activity: 0%

    Registriert seit
    Sep 2005
    Beiträge
    270
    Points
    6.074
    Level
    50
    Downloads
    0
    Uploads
    0

    Standard

    someone please answer my question (see above)

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

    to overwrite the pad to be attomatic i have to overwrite this
    Code:
    time = 0
    pi = math.atan(1) * 4
    while true do           
    screen:clear()
    
    x = math.sin(pi * 2 / 360 * time) * 150 + 192.5
    screen:print(x, 100, "HELLO", blue)
    time = time + 1
    if time >= 360 then
    		time = 0
    	end
    ?
    or i can keep the "letterPosx = 200
    letterPosy = 150"?
    Bequiet!!!
    I'm learning cc©cc

  30. #1800
    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 what do i replace if pad:circle() to make it attomatic so it moves by it self with out pressing a button ?
    Bequiet!!!
    I'm learning cc©cc


 

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:59 PM Uhr.

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