Seite 89 von 342 ErsteErste ... 39 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 139 189 ... LetzteLetzte
Zeige Ergebnis 2.641 bis 2.670 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; The only thing I can think of is maybe you're loading too many images OR what I think the problem ...

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

    The only thing I can think of is maybe you're loading too many images OR what I think the problem is, is "lv1.png" Is "lv1.png" a huge image? If it is it might be having problems blitting it or even loading it.


    Zitat Zitat von Noriko
    I would call you gay but I love you.


    Wait ...huh.



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

    Well the images are like 4kb apiece and the BG is a 480x272 image thats.... wtf... 90kb... maybe thats the problem

    EDIT: And it is. Thank you! now I need a new BG
    Geändert von Mast3r_Shak3 (06-15-2006 um 07:12 AM Uhr)

    --XBL Gamertag: PhenoM904--

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

    OKay... umm how do I have it so when I press left on the d-pad a left arrow will show. But when I press right a right arrow shows? (And the left arrow be gone so it doesnt look like <->)

    --XBL Gamertag: PhenoM904--

  4. #2644
    Developer
    Points: 12.360, Level: 72
    Level completed: 78%, Points required for next Level: 90
    Overall activity: 0%

    Registriert seit
    Mar 2006
    Ort
    Isle of Wight
    Beiträge
    491
    Points
    12.360
    Level
    72
    Downloads
    0
    Uploads
    0

    Standard

    Like this:

    Code:
    right = Image.load("rightarrow.png")
    left = Image.load("leftarrow.png")
    background = Image.load("background.png")
    
    while true do
    pad = Controls.read()
    
    if pad:right() then
    screen:blit(0, 0, background)
    screen:blit(10, 10, right)
    end
    
    if pad:left() then
    screen:blit(0, 0, background)
    screen:blit(10, 10, left)
    end
    
    end
    That should work.


    PM me for a sig like this!

    http://dspspforums.com/forums/index.php SIGN UP NOW!

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

    Doesnt really work... It makes it all slow and Im doing it for a sidescrolling engine with multiple images on the screen.

    --XBL Gamertag: PhenoM904--

  6. #2646
    Developer
    Points: 14.378, Level: 77
    Level completed: 82%, Points required for next Level: 72
    Overall activity: 0%

    Registriert seit
    Oct 2005
    Ort
    Boston, MA
    Beiträge
    1.389
    Points
    14.378
    Level
    77
    Downloads
    0
    Uploads
    0

    Standard

    I know that this is a real noob like question but:
    What does the alpha channel in LUA do and how do i use it?
    --Vaza

  7. #2647
    QJ Gamer Bronze
    Points: 4.543, Level: 42
    Level completed: 97%, Points required for next Level: 7
    Overall activity: 0%

    Registriert seit
    Apr 2006
    Beiträge
    213
    Points
    4.543
    Level
    42
    Downloads
    0
    Uploads
    0

    Standard Mirroring an Image

    Something I've noticed when looking through a bunch of the lua homebrew. In platformers, specifically, I see folks making multiple copies of the same sprite so they have a left and right direction of each. I assume that it'd be more convenient to simply mirror the sprite horizontally when drawing, depending on the desired direction. I'd hoped to test it myself, but I've been hard pressed to find a bit of code lending this function. Looking into the lua snippets, I found something that I thought might lead me to an answer, but I've hit a bit of a road block.

    The rotate by 90 degrees code,
    Code:
    -- Variables
    smile = Image.load("smiley.png")
    function rotateImage(theImage)
    	newImage = Image.createEmpty(theImage:height(), theImage:width())
    	for x = 1, theImage:width() do
    		for y = 1, theImage:height() do
    			newImage:blit(y, x, theImage, x, y, 1, 1)
    		end
    	end
    	return newImage
    end -- rotateImage
    --main program
    screen:blit(0, 0, smile)
    screen:blit(100, 0, rotateImage(smile))
    screen:flip()
    screen.waitVblankStart(600)
    with the included image, seems to show an image being simply rotated by 90 degrees. However, when you change the image, you see that it actually gets mirrored either horizontally or vertically while being rotated.



    I've messed with bits of it, but I'm still new to these lua functions, and find that one often has to find a workaround for non-defaults. Some help with the matter would be much appreciated.

  8. #2648
    QJ Gamer Green
    Points: 5.559, Level: 48
    Level completed: 5%, Points required for next Level: 191
    Overall activity: 0%

    Registriert seit
    Jan 2006
    Beiträge
    506
    Points
    5.559
    Level
    48
    Downloads
    0
    Uploads
    0

    Standard

    You could use this to mirror it (just made it, so I haven't tested it, but it should work):

    Code:
    -- Variables
    smile = Image.load("smiley.png")
    function mirrorImage(theImage)
    	newImage = Image.createEmpty(theImag  e:height(), theImage:width())
    	for x = theImage:width(),1,-1 do
    		for y = 1, theImage:height() do
    			newImage:blit(x, y, theImage, x, y, 1, 1)
    		end
    	end
    	return newImage
    end -- rotateImage
    Pretty easy actually (yes I used this code as a basis).
    LUA manual:
    [url]http://www.lua.org/manual/5.0/manual.html[/url]

    LUA Wiki:
    [url]http://wiki.ps2dev.org/psp:lua_player[/url]

  9. #2649
    QJ Gamer Green
    Points: 5.559, Level: 48
    Level completed: 5%, Points required for next Level: 191
    Overall activity: 0%

    Registriert seit
    Jan 2006
    Beiträge
    506
    Points
    5.559
    Level
    48
    Downloads
    0
    Uploads
    0

    Standard

    Zitat Zitat von Vaza
    I know that this is a real noob like question but:
    What does the alpha channel in LUA do and how do i use it?
    --Vaza
    It sets the transparency. 0 is no transparency and 255 is full transparency.
    LUA manual:
    [url]http://www.lua.org/manual/5.0/manual.html[/url]

    LUA Wiki:
    [url]http://wiki.ps2dev.org/psp:lua_player[/url]

  10. #2650
    QJ Gamer Bronze
    Points: 4.543, Level: 42
    Level completed: 97%, Points required for next Level: 7
    Overall activity: 0%

    Registriert seit
    Apr 2006
    Beiträge
    213
    Points
    4.543
    Level
    42
    Downloads
    0
    Uploads
    0

    Standard

    Zitat Zitat von Altair
    You could use this to mirror it (just made it, so I haven't tested it, but it should work):

    *insert code here*

    Pretty easy actually (yes I used this code as a basis).
    Actually, it does the exact same thing as if you had only swapped the x and y in the blit function: copied the image exactly as it had been. Thanks for the attempt, though.

  11. #2651
    &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

    Zitat Zitat von Paburo
    Actually, it does the exact same thing as if you had only swapped the x and y in the blit function: copied the image exactly as it had been. Thanks for the attempt, though.
    i need help on doing that too,,

  12. #2652
    QJ Gamer Green
    Points: 7.598, Level: 58
    Level completed: 24%, Points required for next Level: 152
    Overall activity: 0%

    Registriert seit
    Nov 2005
    Ort
    NoWhere . . . .
    Beiträge
    1.266
    Points
    7.598
    Level
    58
    Downloads
    0
    Uploads
    0

    Standard

    Can any one help me I want my program to Save a irda signal to a variable on a botton press while selecting an object on a menu.
    This is what I have so far:
    Code:
    if pad:circle() and menustatus == -1 then
    irdasignal = System.irdaRead()
    end

  13. #2653
    QJ Gamer Green
    Points: 5.559, Level: 48
    Level completed: 5%, Points required for next Level: 191
    Overall activity: 0%

    Registriert seit
    Jan 2006
    Beiträge
    506
    Points
    5.559
    Level
    48
    Downloads
    0
    Uploads
    0

    Standard

    Zitat Zitat von Paburo
    Actually, it does the exact same thing as if you had only swapped the x and y in the blit function: copied the image exactly as it had been. Thanks for the attempt, though.
    Huh? It should work assuming that LUA starts at the last x and ends with the first one. I looked it up in the manual and LUA should be able to do that because I make it use steps of -1.
    Did you try it with the yellow/purple smiley?
    LUA manual:
    [url]http://www.lua.org/manual/5.0/manual.html[/url]

    LUA Wiki:
    [url]http://wiki.ps2dev.org/psp:lua_player[/url]

  14. #2654
    QJ Gamer Bronze
    Points: 4.543, Level: 42
    Level completed: 97%, Points required for next Level: 7
    Overall activity: 0%

    Registriert seit
    Apr 2006
    Beiträge
    213
    Points
    4.543
    Level
    42
    Downloads
    0
    Uploads
    0

    Standard

    Zitat Zitat von Altair
    Huh? It should work assuming that LUA starts at the last x and ends with the first one. I looked it up in the manual and LUA should be able to do that because I make it use steps of -1.
    Did you try it with the yellow/purple smiley?
    I wouldn't try it with any other. Implimenting the code you handed me, the image is just copied exactly.

    Code:
    -- Variables
    smile = Image.load("smiley.png")
    function mirrorImage(theImage)
    	newImage = Image.createEmpty(theImage:height(), theImage:width())
    	for x = theImage:width(),1,-1 do
    		for y = 1, theImage:height() do
    			newImage:blit(x, y, theImage, x, y, 1, 1)
    		end
    	end
    	return newImage
    end -- rotateImage
    screen:blit(0, 0, smile)
    screen:blit(100, 0, mirrorImage(smile))
    screen:flip()
    screen.waitVblankStart(600)

  15. #2655
    QJ Gamer Green
    Points: 5.559, Level: 48
    Level completed: 5%, Points required for next Level: 191
    Overall activity: 0%

    Registriert seit
    Jan 2006
    Beiträge
    506
    Points
    5.559
    Level
    48
    Downloads
    0
    Uploads
    0

    Standard

    Got it I forgot that it uses the same x:

    Code:
    smile= Image.load("smiley.png")
    
    function mirrorImage(theImage)
    	newImage = Image.createEmpty(theImage:width(),theImage:height())
    	x2=0          --second x needed otherwise it pastes the x at the same place
    	for x = theImage:width(),0,-1 do
    		for y = 0, theImage:height() do
    			newImage:blit(x, y, theImage, x2, y, 1, 1)
    		end
    		x2=x2+1
    	end
    	return newImage
    end
    
    screen:clear()
    screen:blit(0, 0, smile)
    screen:blit(100, 0, mirrorImage(smile))
    screen.waitVblankStart()
    screen:flip()
    
    while true do           -- this is just for testing purpose
            screen.waitVblankStart()
    
    	pad = Controls.read()
    		if pad:start() then
    			break
    		end
    end
    Geändert von Altair (06-16-2006 um 03:01 AM Uhr)
    LUA manual:
    [url]http://www.lua.org/manual/5.0/manual.html[/url]

    LUA Wiki:
    [url]http://wiki.ps2dev.org/psp:lua_player[/url]

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

    Ok.. Im making a sidescroll engine and I need help with direction association with the sprites when i press left and right. Ive tested a few things but I get over lapping images... help?

    --XBL Gamertag: PhenoM904--

  17. #2657
    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 MaSt3r_ShAk3
    Ok.. Im making a sidescroll engine and I need help with direction association with the sprites when i press left and right. Ive tested a few things but I get over lapping images... help?

    are you coding your own? or are u using my tut? OR are you using lumos code??
    --------------------------------------------------------------------------------------

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

    Which tuts are you reffering to?

    Heres my code
    Code:
    black = Color.new(0,0,0)
    
    --VARIABLES/ARRAYS--
    player = {}
    player.x = 20
    player.y = 200
    
    enemy = {}
    enemy.x = 420
    enemy.y = 200
    
    poox = nil    --poox, pooy = player poo--
    pooy = nil   
    poo2x = nil   --poo2x, poo2y = AI poo--
    poo2y = nil 
    
    at=1 --Air Time--
    aj=0 --Active Jump--
    r=0 --Ready (To Jump)--
    
    z = 0
    
    --IMAGES--
    browndashleft = Image.load("brown/monkey1dashl.png")
    browndashright = Image.load("brown/monkey1dashr.png")
    brownhitleft = Image.load("brown/monkey1hitl.png")
    brownhitright = Image.load("brown/monkey1hitr.png")
    brownjumpleft = Image.load("brown/monkey1jumpl.png")
    brownjumpright = Image.load("brown/monkey1jumpr.png")
    brownstandleft = Image.load("brown/monkey1standl.png")
    brownstandright = Image.load("brown/monkey1standr.png")
    
    bluedashleft = Image.load("blue/monkey2dashl.png")
    bluedashright = Image.load("blue/monkey2dashr.png")
    bluehitleft = Image.load("blue/monkey2hitl.png")
    bluejumpleft = Image.load("blue/monkey2jumpl.png")
    bluejumpright = Image.load("blue/monkey2jumpr.png")
    bluestandleft = Image.load("blue/monkey2standl.png")
    bluestandright = Image.load("blue/monkey2standr.png")
    
    bg = Image.load("background.png")
    
    --FUNCTIONS--
    function moveleft()
       z = 1
         if player.x > 0 then
         player.x = player.x - 5
         end
    end
    
    function moveright()
       z = 2
         if player.x < 456 then
         player.x = player.x + 5
         end
    end
    
    function textbgstuff()
       screen:blit(0,0, bg, false)
       screen:print(2,2, "WiP Engine Test", black)
       screen:print(2,12, "DONE: Movement, Sprites, jumping", black)
       screen:print(2,22, "TODO: throwing, AI, collision, directional association", black)
    end
    
    function blitstuff()
       screen:blit(player.x, player.y, browndashright)
       screen:blit(enemy.x, enemy.y, bluestandleft)
    end
    
    function throw()
    --being worked on--
    end
    
    function jump()
    --being worked on--
    end
    
    function direction()
       if z == 1 then
          screen:blit(player.x, player.y, browndashleft)
       end
       if z == 2 then
          screen:blit(player.x, player.y, browndashright)
       end
    end
    
    function jump()
    if aj==0 and math.abs(player.y) > 199 then 
       r=1 else r=0 
    end
    
    if pad:square() and r==1 then 
       aj=1 
    end
    
    if aj==1 and math.abs(at) < 100 then 
       player.y=player.y-5 
       at=at+1 
    end
    
    if at==20 then 
       aj=0 
       at=1 
    end
    
    if aj==0 and math.abs(player.y) < 200 then 
       player.y=player.y+6 
    end
    end
    
    while true do  ----MAIN LOOP----
    
    screen:clear()
    
    textbgstuff()
    
    pad = Controls.read() 
    
    if pad:left() then
       moveleft()
    end
    
    if pad:right() then
       moveright()
    end
    
    direction()
    jump()
    
    if pad:start() then 
    	break
    end
    
    blitstuff()
    
    screen.flip()
    screen.waitVblankStart()
    end

    --XBL Gamertag: PhenoM904--

  19. #2659
    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 MaSt3r_ShAk3
    Which tuts are you reffering to?

    Heres my code
    Code:
    black = Color.new(0,0,0)
    
    --VARIABLES/ARRAYS--
    player = {}
    player.x = 20
    player.y = 200
    
    enemy = {}
    enemy.x = 420
    enemy.y = 200
    
    poox = nil    --poox, pooy = player poo--
    pooy = nil   
    poo2x = nil   --poo2x, poo2y = AI poo--
    poo2y = nil 
    
    at=1 --Air Time--
    aj=0 --Active Jump--
    r=0 --Ready (To Jump)--
    
    z = 0
    
    --IMAGES--
    browndashleft = Image.load("brown/monkey1dashl.png")
    browndashright = Image.load("brown/monkey1dashr.png")
    brownhitleft = Image.load("brown/monkey1hitl.png")
    brownhitright = Image.load("brown/monkey1hitr.png")
    brownjumpleft = Image.load("brown/monkey1jumpl.png")
    brownjumpright = Image.load("brown/monkey1jumpr.png")
    brownstandleft = Image.load("brown/monkey1standl.png")
    brownstandright = Image.load("brown/monkey1standr.png")
    
    bluedashleft = Image.load("blue/monkey2dashl.png")
    bluedashright = Image.load("blue/monkey2dashr.png")
    bluehitleft = Image.load("blue/monkey2hitl.png")
    bluejumpleft = Image.load("blue/monkey2jumpl.png")
    bluejumpright = Image.load("blue/monkey2jumpr.png")
    bluestandleft = Image.load("blue/monkey2standl.png")
    bluestandright = Image.load("blue/monkey2standr.png")
    
    bg = Image.load("background.png")
    
    --FUNCTIONS--
    function moveleft()
       z = 1
         if player.x > 0 then
         player.x = player.x - 5
         end
    end
    
    function moveright()
       z = 2
         if player.x < 456 then
         player.x = player.x + 5
         end
    end
    
    function textbgstuff()
       screen:blit(0,0, bg, false)
       screen:print(2,2, "WiP Engine Test", black)
       screen:print(2,12, "DONE: Movement, Sprites, jumping", black)
       screen:print(2,22, "TODO: throwing, AI, collision, directional association", black)
    end
    
    function blitstuff()
       screen:blit(player.x, player.y, browndashright)
       screen:blit(enemy.x, enemy.y, bluestandleft)
    end
    
    function throw()
    --being worked on--
    end
    
    function jump()
    --being worked on--
    end
    
    function direction()
       if z == 1 then
          screen:blit(player.x, player.y, browndashleft)
       end
       if z == 2 then
          screen:blit(player.x, player.y, browndashright)
       end
    end
    
    function jump()
    if aj==0 and math.abs(player.y) > 199 then 
       r=1 else r=0 
    end
    
    if pad:square() and r==1 then 
       aj=1 
    end
    
    if aj==1 and math.abs(at) < 100 then 
       player.y=player.y-5 
       at=at+1 
    end
    
    if at==20 then 
       aj=0 
       at=1 
    end
    
    if aj==0 and math.abs(player.y) < 200 then 
       player.y=player.y+6 
    end
    end
    
    while true do  ----MAIN LOOP----
    
    screen:clear()
    
    textbgstuff()
    
    pad = Controls.read() 
    
    if pad:left() then
       moveleft()
    end
    
    if pad:right() then
       moveright()
    end
    
    direction()
    jump()
    
    if pad:start() then 
    	break
    end
    
    blitstuff()
    
    screen.flip()
    screen.waitVblankStart()
    end

    umm, how is that a sidescrolling engine??
    --------------------------------------------------------------------------------------

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

    Well its sidescrolling... maybe im not using the right terminology... but i still need help...

    --XBL Gamertag: PhenoM904--

  21. #2661
    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 MaSt3r_ShAk3
    Well its sidescrolling... maybe im not using the right terminology... but i still need help...
    is our background moving to the left or right automatically??
    --------------------------------------------------------------------------------------

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

    No... okay i get it its not an engine but I still need help..........

    --XBL Gamertag: PhenoM904--

  23. #2663
    TheMarioKarters
    Guest

    Standard

    Master Shake, is that the Monkey Poo fight game you and bronx are doing?

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

    Yeah.

    --XBL Gamertag: PhenoM904--

  25. #2665
    QJ Gamer Silver
    Points: 9.678, Level: 66
    Level completed: 7%, Points required for next Level: 372
    Overall activity: 0%

    Registriert seit
    Jun 2005
    Ort
    The Migrant Fleet
    Beiträge
    908
    Points
    9.678
    Level
    66
    Downloads
    0
    Uploads
    0

    Standard

    Are you gonna finish flipbook?

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

    At one point... butterballer on psp-programming said he wanted to work with me and i accepted and he said he rewrote flipbook completely... but Im gonna wait til I get back in florida to do any more work on that

    --XBL Gamertag: PhenoM904--

  27. #2667
    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 MaSt3r_ShAk3
    No... okay i get it its not an engine but I still need help..........

    can u pm me the files wit the images?? i u want?? i can tyr to fix it. i cant see wha you mean by using words. i wont steal. i dont need to,
    --------------------------------------------------------------------------------------

  28. #2668
    QJ Gamer Green
    Points: 7.598, Level: 58
    Level completed: 24%, Points required for next Level: 152
    Overall activity: 0%

    Registriert seit
    Nov 2005
    Ort
    NoWhere . . . .
    Beiträge
    1.266
    Points
    7.598
    Level
    58
    Downloads
    0
    Uploads
    0

    Standard

    I got two questons
    1.
    Can any one help me I want my program to Save a irda signal to a variable on a botton press while selecting an object on a menu.
    This is what I have so far:
    Code:
    if pad:circle() and menustatus == -1 then
    irdasignal = System.irdaRead()
    end
    2.
    when I hit left or right my pic. doesnt move but when I hit up or down it moves .
    Code:
    red = Color.new(255, 0, 0);
    white = Color.new(255, 255, 255);
    
    char = Image.load("char.png")
    
    y = 100
    x = 100
    
    while true do
    	screen:clear()
    	-- read current pad
    	pad = Controls.read()
    
    		if pad:up() then
    			y = y - 1
    		elseif pad:down() then
    			y = y + 1
    		elseif pad:left() then
    			X = x - 1
    		elseif pad:right() then
    			X = x + 1
    		end
    	screen:blit(x, y, char, 0, 0, char:width(), char:height(), true)
    screen.flip()
    	screen.waitVblankStart()
    	if pad:start() then break end
    end
    Geändert von zmathue (06-16-2006 um 09:06 AM Uhr)

  29. #2669
    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 zmathue
    I got two questons
    1.
    Can any one help me I want my program to Save a irda signal to a variable on a botton press while selecting an object on a menu.
    This is what I have so far:
    Code:
    if pad:circle() and menustatus == -1 then
    irdasignal = System.irdaRead()
    end
    2.
    when I hit left or right my pic. doesnt move but when I hit up or down it moves .
    Code:
    red = Color.new(255, 0, 0);
    white = Color.new(255, 255, 255);
    
    char = Image.load("char.png")
    
    y = 100
    x = 100
    
    while true do
    	screen:clear()
    	-- read current pad
    	pad = Controls.read()
    
    		if pad:up() then
    			y = y - 1
    		elseif pad:down() then
    			y = y + 1
    		elseif pad:left() then
    			X = cx - 1
    		elseif pad:right() then
    			X = cx + 1
    		end
    	screen:blit(x, y, char, 0, 0, char:width(), char:height(), true)
    screen.flip()
    	screen.waitVblankStart()
    	if pad:start() then break end
    end

    i dont know aboyut the first question, but in the second one, have you defined cx?? or did you men to put just "x"?
    --------------------------------------------------------------------------------------

  30. #2670
    QJ Gamer Green
    Points: 7.598, Level: 58
    Level completed: 24%, Points required for next Level: 152
    Overall activity: 0%

    Registriert seit
    Nov 2005
    Ort
    NoWhere . . . .
    Beiträge
    1.266
    Points
    7.598
    Level
    58
    Downloads
    0
    Uploads
    0

    Standard

    I changed them to that to see if it was my variable that was the problem I guess I forgot to change it back to x when I posted.
    ^^i fixed the thred now^^


 

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 .