Seite 217 von 342 ErsteErste ... 117 167 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 267 317 ... LetzteLetzte
Zeige Ergebnis 6.481 bis 6.510 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; Yes the character moves. If you were to run the fiel the character would move but then you are supposed ...

  
  1. #6481
    QJ Gamer Blue
    Points: 5.344, Level: 46
    Level completed: 97%, Points required for next Level: 6
    Overall activity: 0%

    Registriert seit
    May 2006
    Beiträge
    347
    Points
    5.344
    Level
    46
    Downloads
    0
    Uploads
    0

    Standard

    Yes the character moves. If you were to run the fiel the character would move but then you are supposed to be able to hit triangle to shoot up square to shooot left and so on but when i hit one of those buttons i encounter that error i posted on the last page.



  2. #6482
    QJ Gamer Gold
    Points: 11.942, Level: 71
    Level completed: 73%, Points required for next Level: 108
    Overall activity: 0%

    Registriert seit
    Nov 2006
    Ort
    ...
    Beiträge
    2.080
    Points
    11.942
    Level
    71
    Downloads
    0
    Uploads
    0

    Standard

    try this:
    Code:
    if pad:triangle() and BulletInfo[i].direction == "up" then
    		BulletInfo[i].y = BulletInfo[i].y - 10 
    		end
    	end
    wait a sec i got another question about your code

    Code:
    BulletInfo[a] = { pic = bullet , firing = false, direction = "right", x = Player[1].x + 32, 
    	y = Player[1].y + 16 }
    end
    you have BulletInfo[a] but every where else you put BulletInfo[i], maybe taht has something to do with your error

  3. #6483
    QJ Gamer Blue
    Points: 5.344, Level: 46
    Level completed: 97%, Points required for next Level: 6
    Overall activity: 0%

    Registriert seit
    May 2006
    Beiträge
    347
    Points
    5.344
    Level
    46
    Downloads
    0
    Uploads
    0

    Standard

    Ok here is a code that acccesdenied helped me with that runs put does not shoot. Maybe we should start here then add to it and try to get it to shoot.

    Code:
    green=Color.new(0,255,0)
    grass=Image.load("grass.png")
    player=Image.load("player.png")
    tree=Image.load("tree.png")
    bullet = Image.createEmpty(4,4)
    bullet:clear(green)
    
    screenwidth=480-player:width()
    screenheight=272-player:width()
    
    Player={}
    Player[1]={x=200, y=50}
    
    oldpad = Controls.read()
    currentBullet = 0
    
    BulletInfo = {}
    for a = 1,800 do
    	BulletInfo[a] = { pic = bullet , firing = false, direction = "right", x = Player[1].x + 32, 
    	y = Player[1].y + 16 }
    end
    
    function bulletSetup()
    	if currentBullet < 800 then
    		currentBullet = currentBullet + 1
    	else
    		currentBullet = 1
    	end
    end
    function bulletFire()
    	for i = 1,800 do
    		if BulletInfo[i].firing == true then
    			screen:blit(BulletInfo[i].x,BulletInfo[i].y,BulletInfo[i].pic)
    		end
    		if BulletInfo[i].x < 0 or BulletInfo[i].x > 480 or BulletInfo[i].y < 0 or BulletInfo[i].y > 272 then 
    			BulletInfo[i].firing = false 
    		end
    	end
    end
    
    while true do
    	pad=Controls.read()
    	screen:clear()
    
    	bulletSetup()
    
    	for a=0, 14 do
    		for b=0, 8 do
    			screen:blit(32 * a, 32 * b, grass)
    		end
    	end
    
    	screen:blit(100,100,tree)
    	screen:blit(300,220,tree)
    	screen:blit(87,46,tree)
    	screen:blit(400,150,tree)
    	screen:blit(Player[1].x,Player[1].y,player)
    
    	if pad:left() and Player[1].x>0 then
    		Player[1].x=Player[1].x-3
    	end
    
    	if pad:right() and Player[1].x<screenwidth then
    		Player[1].x=Player[1].x+3
    	end
    
    	if pad:up() and Player[1].y>0 then
    		Player[1].y=Player[1].y-3
    	end
    
    	if pad:down() and Player[1].y<screenheight then 
    		Player[1].y=Player[1].y+3
    	end
    
    	if pad:triangle() then
    		if BulletInfo[i].direction == "up" then 
    			BulletInfo[i].y = BulletInfo[i].y - 10 
    		end
    	end
    	if pad:circle() then
    		if BulletInfo[i].direction == "right" then 
    			BulletInfo[i].x = BulletInfo[i].x + 10 
    		end
    	end
    	if pad:cross() then
    		if BulletInfo[i].direction == "down" then 
    			BulletInfo[i].y = BulletInfo[i].y + 10 
    		end
    	end
    	if pad:square() then
    		if BulletInfo[i].direction == "left" then 
    			BulletInfo[i].x = BulletInfo[i].x - 10 
    		end
    	end
    
    	bulletFire()
    
    	screen.waitVblankStart()
    	screen.flip()
    end

  4. #6484
    QJ Gamer Gold
    Points: 11.942, Level: 71
    Level completed: 73%, Points required for next Level: 108
    Overall activity: 0%

    Registriert seit
    Nov 2006
    Ort
    ...
    Beiträge
    2.080
    Points
    11.942
    Level
    71
    Downloads
    0
    Uploads
    0

    Standard

    ? could you plz break that sentence up for me, there's no commas, and that threw me off

  5. #6485
    QJ Gamer Blue
    Points: 5.344, Level: 46
    Level completed: 97%, Points required for next Level: 6
    Overall activity: 0%

    Registriert seit
    May 2006
    Beiträge
    347
    Points
    5.344
    Level
    46
    Downloads
    0
    Uploads
    0

    Standard

    NVM hold on that code is not running right anymore.

    Well that one gets the same error as the last one. To restat that sentence, that code is a code that AccessDenied helped me with. It did run but it does not seem to anymore. I hope i typed this one better.


    And thanks for all the help by the way
    -= Double Post =-
    Code:
    green=Color.new(0,255,0)
    grass=Image.load("grass.png")
    player=Image.load("player.png")
    tree=Image.load("tree.png")
    bullet = Image.createEmpty(4,4)
    bullet:clear(green)
    
    screenwidth=480-player:width()
    screenheight=272-player:width()
    
    Player={}
    Player[1]={x=200, y=50}
    
    oldpad = Controls.read()
    currentBullet = 0
    
    BulletInfo = {}
    for a = 1,800 do
    	BulletInfo[a] = { pic = bullet , firing = false, direction = "right", x = Player[1].x + 32, 
    	y = Player[1].y + 16 }
    end
    
    function bulletSetup()
    	if currentBullet < 800 then
    		currentBullet = currentBullet + 1
    	else
    		currentBullet = 1
    	end
    end
    function bulletFire()
    	for i = 1,800 do
    		if BulletInfo[i].firing == true then
    			screen:blit(BulletInfo[i].x,BulletInfo[i].y,BulletInfo[i].pic)
    		end
    		if BulletInfo[i].x < 0 or BulletInfo[i].x > 480 or BulletInfo[i].y < 0 or BulletInfo[i].y > 272 then 
    			BulletInfo[i].firing = false 
    		end
    	end
    end
    
    while true do
    	pad=Controls.read()
    	screen:clear()
    
    	bulletSetup()
    
    	for a=0, 14 do
    		for b=0, 8 do
    			screen:blit(32 * a, 32 * b, grass)
    		end
    	end
    
    	screen:blit(100,100,tree)
    	screen:blit(300,220,tree)
    	screen:blit(87,46,tree)
    	screen:blit(400,150,tree)
    	screen:blit(Player[1].x,Player[1].y,player)
    
    	if pad:left() and Player[1].x>0 then
    		Player[1].x=Player[1].x-3
    	end
    
    	if pad:right() and Player[1].x<screenwidth then
    		Player[1].x=Player[1].x+3
    	end
    
    	if pad:up() and Player[1].y>0 then
    		Player[1].y=Player[1].y-3
    	end
    
    	if pad:down() and Player[1].y<screenheight then 
    		Player[1].y=Player[1].y+3
    	end
    
    	if pad:triangle() then
    		if BulletInfo[i].direction == "up" then 
    			BulletInfo[i].y = BulletInfo[i].y - 10 
    		end
    	end
    	if pad:circle() then
    		if BulletInfo[i].direction == "right" then 
    			BulletInfo[i].x = BulletInfo[i].x + 10 
    		end
    	end
    	if pad:cross() then
    		if BulletInfo[i].direction == "down" then 
    			BulletInfo[i].y = BulletInfo[i].y + 10 
    		end
    	end
    	if pad:square() then
    		if BulletInfo[i].direction == "left" then 
    			BulletInfo[i].x = BulletInfo[i].x - 10 
    		end
    	end
    
    	bulletFire()
    
    	screen.waitVblankStart()
    	screen.flip()
    end
    There i just tryed that code and it worked. But when i hit the button to shoot i get the error.
    Geändert von Bob Hoil (03-31-2007 um 06:08 PM Uhr) Grund: Automerged Doublepost

  6. #6486
    QJ Gamer Gold
    Points: 11.942, Level: 71
    Level completed: 73%, Points required for next Level: 108
    Overall activity: 0%

    Registriert seit
    Nov 2006
    Ort
    ...
    Beiträge
    2.080
    Points
    11.942
    Level
    71
    Downloads
    0
    Uploads
    0

    Standard

    well you still have that BulletInfo[a] did it work when you changed the [a] to [i]?

  7. #6487
    QJ Gamer Blue
    Points: 5.344, Level: 46
    Level completed: 97%, Points required for next Level: 6
    Overall activity: 0%

    Registriert seit
    May 2006
    Beiträge
    347
    Points
    5.344
    Level
    46
    Downloads
    0
    Uploads
    0

    Standard

    i got a table error
    -= Double Post =-
    When i put a instead of i
    Geändert von Bob Hoil (03-31-2007 um 06:15 PM Uhr) Grund: Automerged Doublepost

  8. #6488
    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

    Zitat Zitat von Urameshi
    well you still have that BulletInfo[a] did it work when you changed the [a] to [i]?
    Zitat Zitat von Bob Hoil
    i got a table error
    When i put a instead of i
    ...
    牧来栠摩琠敨映汩獥
    PSN: youresam
    From Earth the Frozen Ipaqs shall rise and be silenced and all will live free.
    --Mike Hollingsworth

  9. #6489
    Points: 3.340, Level: 35
    Level completed: 94%, Points required for next Level: 10
    Overall activity: 0%

    Registriert seit
    Mar 2007
    Ort
    Germany
    Beiträge
    8
    Points
    3.340
    Level
    35
    Downloads
    0
    Uploads
    0

    Standard

    hi,

    i just started with lua, so im a complete noob. i did some of the tutorials and they were quite helpfull, and now im just making small, pointless games to get better at it. my question is, if my sprite would only be black on a white background, do i get any advanteges, eg the game running smoother, if i "wrote" the sprite in lua, so its not a picture/image?
    2nd question: i got the free sprites on evilmana.com, but they still have white around them and if i would use it , it would still be in a white square, so u wont see the background or the floor, can that white be made invisible or just "deleted" ?

  10. #6490
    QJ Gamer Green
    Points: 11.800, Level: 71
    Level completed: 38%, Points required for next Level: 250
    Overall activity: 0%

    Registriert seit
    Jul 2006
    Ort
    Middle Europe
    Beiträge
    1.281
    Points
    11.800
    Level
    71
    Downloads
    0
    Uploads
    0

    Standard

    1st question:

    i think if you just create Image.createEmpty(32,32) it will be faster then making 32x32 picture in paint

    2nd q:

    those are gifs, so they should have invisible bg...

  11. #6491
    Points: 3.340, Level: 35
    Level completed: 94%, Points required for next Level: 10
    Overall activity: 0%

    Registriert seit
    Mar 2007
    Ort
    Germany
    Beiträge
    8
    Points
    3.340
    Level
    35
    Downloads
    0
    Uploads
    0

    Standard

    if i had no images in a game at all, how much better would it run? and is it worth the effort?
    Geändert von nUke_moose (04-01-2007 um 02:38 AM Uhr)

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

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

    Standard

    I have a couple lua questions:

    1) Can you rotate images in lua. If so how?

    2) Can you zoom into images? If so how?

    3) Can you blit images from a sprite sheet? if so how?

    Ex:
    aaabbbccc
    aaabbbccc
    dddeeeffff
    dddeeeffff
    dddeeeffff
    gggggggg
    So how would I only blit the 'e' section of the image.

    Thx in advance

  13. #6493
    QJ Gamer Blue
    Points: 5.344, Level: 46
    Level completed: 97%, Points required for next Level: 6
    Overall activity: 0%

    Registriert seit
    May 2006
    Beiträge
    347
    Points
    5.344
    Level
    46
    Downloads
    0
    Uploads
    0

    Standard

    Hey guys i need some help with my code. I am combining tutorials to make a small game to help me learn lua. This is my code but when i try to shoot i get a nil value error. Can anyone help me out here. I changed it a little from the last code i posted a while back but still get the same error.

    Code:
    green=Color.new(0,255,0)
    grass=Image.load("grass.png")
    player=Image.load("player.png")
    tree=Image.load("tree.png")
    bullet = Image.createEmpty(4,4)
    bullet:clear(green)
    
    screenwidth=480-player:width()
    screenheight=272-player:width()
    
    Player={}
    Player[1]={x=200, y=50}
    
    oldpad = Controls.read()
    currentBullet = 0
    
    BulletInfo = {}
    for a = 1,800 do
    	BulletInfo[a] = { pic = bullet , firing = false, direction = "right", x = Player[1].x + 32, 
    	y = Player[1].y + 16 }
    end
    
    function bulletSetup()
    	if currentBullet < 800 then
    		currentBullet = currentBullet + 1
    	else
    		currentBullet = 1
    	end
    if direction == "left" then 
    BulletInfo[currentBullet].x = Player[1].x 
    BulletInfo[currentBullet].y = Player[1].y + 16
    end
    if direction == "right" then 
    BulletInfo[currentBullet].x = Player[1].x + 32 
    BulletInfo[currentBullet].y = Player[1].y + 16 
    end
    if direction == "up" then 
    BulletInfo[currentBullet].x = Player[1].x + 16 
    BulletInfo[currentBullet].y = Player[1].y 
    end
    if direction == "down" then 
    BulletInfo[currentBullet].x = Player[1].x + 16
    BulletInfo[currentBullet].y = Player[1].y + 32 
    end
    
    BulletInfo[currentBullet].direction = direction
    BulletInfo[currentBullet].firing = true
    end
    
    function bulletFire()
    	for i = 1,800 do
    		if BulletInfo[i].firing == true then
    			screen:blit(BulletInfo[i].x,BulletInfo[i].y,BulletInfo[i].pic)
    		end
    		if BulletInfo[i].x < 0 or BulletInfo[i].x > 480 or BulletInfo[i].y < 0 or BulletInfo[i].y > 272 then 
    			BulletInfo[i].firing = false 
    		end
    	end
    end
    
    while true do
    	pad=Controls.read()
    	screen:clear()
    
    	bulletSetup()
    
    	for a=0, 14 do
    		for b=0, 8 do
    			screen:blit(32 * a, 32 * b, grass)
    		end
    	end
    
    	screen:blit(100,100,tree)
    	screen:blit(300,220,tree)
    	screen:blit(87,46,tree)
    	screen:blit(400,150,tree)
    	screen:blit(Player[1].x,Player[1].y,player)
    
    	if pad:left() and Player[1].x>0 then
    		Player[1].x=Player[1].x-3
    	end
    
    	if pad:right() and Player[1].x<screenwidth then
    		Player[1].x=Player[1].x+3
    	end
    
    	if pad:up() and Player[1].y>0 then
    		Player[1].y=Player[1].y-3
    	end
    
    	if pad:down() and Player[1].y<screenheight then 
    		Player[1].y=Player[1].y+3
    	end
    
    	if pad:triangle() and BulletInfo[i].direction == "up" then
    			bulletFire()
    			BulletInfo[i].y = BulletInfo[i].y - 10 
    		end
    	if pad:circle() and BulletInfo[i].direction == "right" then 
    			bulletFire()
    			BulletInfo[i].x = BulletInfo[i].x + 10 
    		end
    	if pad:cross() and BulletInfo[i].direction == "down" then 
    			bulletFire()
    			BulletInfo[i].y = BulletInfo[i].y + 10 
    		end
    	if pad:square() and BulletInfo[i].direction == "left" then 
    			bulletFire()
    			BulletInfo[i].x = BulletInfo[i].x - 10 
    		end
    	screen.waitVblankStart()
    	screen.flip()
    end

  14. #6494
    QJ Gamer Gold
    Points: 11.942, Level: 71
    Level completed: 73%, Points required for next Level: 108
    Overall activity: 0%

    Registriert seit
    Nov 2006
    Ort
    ...
    Beiträge
    2.080
    Points
    11.942
    Level
    71
    Downloads
    0
    Uploads
    0

    Standard

    @pspfreak

    ex:
    Code:
    Sasuke=Image.load(where ever the file is)
    
    r1=Image.createEmpty(66,45)
    
    r1:blit(0,0,Sasuke,0,3,66,45)
    1st line: Sasuke is the spritesheet

    2nd line: r1 is the name and Image.createEmpty is making a blank image the size of 66,45

    3rd line: r1 is the name and you blit it from 0,0 which is the size of the whole sprite sheet
    and Sasuke is the sprite sheet
    the 0,3 is where it is on the sprite sheet and 66,45 is the size

    now all you have to do is basically put it like that but sub in your own info

  15. #6495
    QJ Gamer Blue
    Points: 4.369, Level: 42
    Level completed: 10%, Points required for next Level: 181
    Overall activity: 0%

    Registriert seit
    Feb 2007
    Beiträge
    246
    Points
    4.369
    Level
    42
    Downloads
    0
    Uploads
    0

    Standard

    while that does work, creating new images like that uses up memory. A better way to do it is to skip over the image create and just blit directly to the screen:

    screen:blit(0,0,Sasuke,0, 3,66,45)

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

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

    Standard

    cool thanks
    EDIT:
    what about rotating images?

  17. #6497
    QJ Gamer Blue
    Points: 4.369, Level: 42
    Level completed: 10%, Points required for next Level: 181
    Overall activity: 0%

    Registriert seit
    Feb 2007
    Beiträge
    246
    Points
    4.369
    Level
    42
    Downloads
    0
    Uploads
    0

    Standard

    there are a few different ways to do that (check the evilmana codebase for one of them)

    however, doing it that way is slow, so in order to keep your program running smoothly you'd have to pre-render the rotated images, which again will eat up your free memory. The only other way to do it that I've found uses the 3d gu, and while using the 3d functions is fast, but that it doesn't work well when you try to combine it with regular 2d blits

  18. #6498
    .info
    Points: 15.395, Level: 80
    Level completed: 9%, Points required for next Level: 455
    Overall activity: 0%

    Registriert seit
    Jun 2006
    Ort
    ACT, Australia
    Beiträge
    1.674
    Points
    15.395
    Level
    80
    Downloads
    0
    Uploads
    0

    Standard

    Damn why won't this work!

    Code:
    for i = 1,100 do
    coinx = i*x
    screen:blit(olx + coinx, oly, coinage[i])
    coinage[i]:blit(0,0,coin)
    
    if collision(mariox, marioy, 47, 55, coinx, oly, 25, 25) then
    coinage[i]:clear()
    coins = coins + 1
    end
    end
    It's not detecting collision (no im not dumb i have the function) for some reason to do with the loop, and out of the loop it wont detect anyway Please help!

    http://www.yongobongo.com
    PSN - yongobongo

  19. #6499
    QJ Gamer Blue
    Points: 4.369, Level: 42
    Level completed: 10%, Points required for next Level: 181
    Overall activity: 0%

    Registriert seit
    Feb 2007
    Beiträge
    246
    Points
    4.369
    Level
    42
    Downloads
    0
    Uploads
    0

    Standard

    maybe you need to use olx+coinx when you call the collision function?

  20. #6500
    QJ Gamer Blue
    Points: 3.768, Level: 38
    Level completed: 79%, Points required for next Level: 32
    Overall activity: 0%

    Registriert seit
    Apr 2007
    Beiträge
    70
    Points
    3.768
    Level
    38
    Downloads
    0
    Uploads
    0

    Standard

    heyyy hay there this is my fiorst post in this forum, well i was learning somthing about lua stuff here is a code for make a simple starfield by the way does any body know how to, a = a + 1 like a++ or a:+1 or a+=1
    this is a common addition in some languages.. but i cant find how to do on lua

    heres is my starfield code:

    Code:
    System.usbDiskModeActivate()
    blanco = Color.new(255,255,255)
    width = 480
    height = 272
    offscreen = Image.createEmpty(width,height)
    maxstars = 200
    maxzlevel = 5
    time1 = 0
    starfield = {}
    math.randomseed(os.time())
    function createStar(i)
    	starfield[i] = {}
    	starfield[i].x = math.random(width-1)
    	starfield[i].y = math.random(height-1)
    	starfield[i].z = math.random(maxzlevel)
    	grey = (255/maxzlevel)*starfield[i].z
    	starfield[i].color = Color.new(grey,grey,grey)
    	starfield[i].colorb = Color.new(grey*2,grey*2,grey*2)
    	starfield[i].speed = starfield[i].z*0.5
    end
    for i = 1, maxstars do
    	createStar(i)
    end
    function drawstars()
    	for i = 1, maxstars do
    		if starfield[i].speed < 1 then zise = 1 else zise = starfield[i].speed end
    		if math.mod(time1,math.random(100)) == 0  then
    			offscreen:fillRect(starfield[i].x-starfield[i].speed/2,starfield[i].y-starfield[i].speed/2,zise,zise,starfield[i].colorb)
    		else
    			offscreen:fillRect(starfield[i].x-starfield[i].speed/2,starfield[i].y-starfield[i].speed/2,zise,zise,starfield[i].color)
    		end
    		--offscreen:print(starfield[i].x+5,starfield[i].y,starfield[i].z,starfield[i].color)
    		starfield[i].y = starfield[i].y + starfield[i].speed
    		if starfield[i].y > height-1 then
    			starfield[i].y = 0
    			starfield[i].x = math.random(width-1)
    		end
    	end
    end
    while true do
    	time1 = time1 + 1
    	screen:clear()
    	offscreen:clear()
    	drawstars()
    	screen:blit(0,0,offscreen,false)
    	screen.flip()
    	screen:waitVblankStart()
    	pad = Controls.read()
    	if pad:start() then
    		break
    	end
    end
    Geändert von ahrimanes (04-03-2007 um 06:32 PM Uhr)

  21. #6501
    lol
    Points: 20.859, Level: 91
    Level completed: 2%, Points required for next Level: 491
    Overall activity: 0%

    Registriert seit
    Aug 2006
    Ort
    Whittier, CA
    Beiträge
    5.791
    Points
    20.859
    Level
    91
    Downloads
    0
    Uploads
    0

    Standard

    Code:
    offscreen = Image.createEmpty(width,h eight)
    Dont you have to fill in the width and height part first?
    -= Double Post =-
    Also, a = a + 1
    You can do that in Lua, Just do that

    Code:
    a = 0
    
    )blah blah)
    
    a = a + 1
    Geändert von Anti-QJ (04-02-2007 um 04:03 PM Uhr) Grund: Automerged Doublepost

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

    just a reminder people, PLEASE USE TAB. you're code is so messy i dont even want to look at it. (talking to everybody here)
    --------------------------------------------------------------------------------------

  23. #6503
    QJ Gamer Silver
    Points: 10.921, Level: 69
    Level completed: 18%, Points required for next Level: 329
    Overall activity: 0%

    Registriert seit
    May 2006
    Ort
    Behind you.
    Beiträge
    1.814
    Points
    10.921
    Level
    69
    Downloads
    0
    Uploads
    0

    Standard

    Zitat Zitat von Grimfate126
    just a reminder people, PLEASE USE TAB. you're code is so messy i dont even want to look at it. (talking to everybody here)
    Lol, you are right. Agreed.
    Calypso - Enjoy the excellent 2D space shooter:
    http://dl.qj.net/Calypso-v1-PSP-Home...6542/catid/195

    "Quoting yourself in your signature means you love to masterbate while looking at the mirror." -me (oh, wait...)

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

    Zitat Zitat von Anti-QJ
    Code:
    offscreen = Image.createEmpty(width,h eight)
    Dont you have to fill in the width and height part first?
    ...he did. Shine put the values on the line right before it. Look next time.
    Zitat Zitat von Anti-QJ
    Also, a = a + 1
    You can do that in Lua, Just do that

    Code:
    a = 0
    
    )blah blah)
    
    a = a + 1

    wtf? He was asking how to do it differently! He already typed a = a + 1, but he was asking how to do a shortcut. Read next time. The answer is there is no other way.

    I am begining to think that you are here simply to (A) Raise your post count and (B) confuse n00bs even more. Please stop.
    牧来栠摩琠敨映汩獥
    PSN: youresam
    From Earth the Frozen Ipaqs shall rise and be silenced and all will live free.
    --Mike Hollingsworth

  25. #6505
    lol
    Points: 20.859, Level: 91
    Level completed: 2%, Points required for next Level: 491
    Overall activity: 0%

    Registriert seit
    Aug 2006
    Ort
    Whittier, CA
    Beiträge
    5.791
    Points
    20.859
    Level
    91
    Downloads
    0
    Uploads
    0

    Standard

    Zitat Zitat von youresam
    ...he did. Shine put the values on the line right before it. Look next time.


    wtf? He was asking how to do it differently! He already typed a = a + 1, but he was asking how to do a shortcut. Read next time. The answer is there is no other way.

    I am begining to think that you are here simply to (A) Raise your post count and (B) confuse n00bs even more. Please stop.
    (C) I misread. Bingo!
    -= Double Post =-
    Wouldn't you just put,

    Code:
    offscreen = Image.createEmpty(480, 272)
    Geändert von Anti-QJ (04-02-2007 um 08:40 PM Uhr) Grund: Automerged Doublepost

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

    Zitat Zitat von Anti-QJ
    (C) I misread. Bingo!
    -= Double Post =-
    Wouldn't you just put,

    Code:
    offscreen = Image.createEmpty(480, 272)
    No, actually learn lua before you come here and try to help. Image.createEmpty takes 2 number arguements, and he passed them through the variables width and height.
    牧来栠摩琠敨映汩獥
    PSN: youresam
    From Earth the Frozen Ipaqs shall rise and be silenced and all will live free.
    --Mike Hollingsworth

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

    Zitat Zitat von Anti-QJ
    Your still mad about yesterday, Arent you?
    As said by abe froeman: "Keep everything that happens away from the forums, away from the forums"

    kthx.
    牧来栠摩琠敨映汩獥
    PSN: youresam
    From Earth the Frozen Ipaqs shall rise and be silenced and all will live free.
    --Mike Hollingsworth

  28. #6508
    QJ Gamer Blue
    Points: 3.768, Level: 38
    Level completed: 79%, Points required for next Level: 32
    Overall activity: 0%

    Registriert seit
    Apr 2007
    Beiträge
    70
    Points
    3.768
    Level
    38
    Downloads
    0
    Uploads
    0

    Standard

    wwwtfff... i copyed my code fron my text editor, sooo why my "tabs" is not working here,, i tried to edit the post and see it have "tabs".... wyyyyyyyyyyy.......
    by the way... im just using height, width, i feell bether whit them example scrcenter = {x = height/2, y = width/2}.
    here is another interesting code.

    Code:
    while true do
    screen:clear()
    for x = 0, 255 do
       for y = 0 , 255 do
            screen:pixel(x,y,Color.new(x,y,128))
       end
    end
    screen:flip()
    screen:waitVblankStart()
    pad = Controls.read()
    if pad:start() then
         break
    end
    end
    hope this help to understand the rgb. of color,,, seyaaaa
    haa b the way does any body knows how to read the item count of an array ? i mean somthing like......
    a = {}
    a[1].x = 10
    a[2].x = 20
    then i want to know how many itemss a got.. like count = a.itemcount() or count = a.listcount() then count should be 2 in this case.
    ???
    Geändert von ahrimanes (04-03-2007 um 06:30 PM Uhr)

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

    wrap it in the [code] tag...
    牧来栠摩琠敨映汩獥
    PSN: youresam
    From Earth the Frozen Ipaqs shall rise and be silenced and all will live free.
    --Mike Hollingsworth

  30. #6510
    QJ Gamer Blue
    Points: 4.369, Level: 42
    Level completed: 10%, Points required for next Level: 181
    Overall activity: 0%

    Registriert seit
    Feb 2007
    Beiträge
    246
    Points
    4.369
    Level
    42
    Downloads
    0
    Uploads
    0

    Standard

    Zitat Zitat von ahrimanes
    b the way does any body knows how to read the item count of an array ? i mean somthing like......
    a = {}
    a[1].x = 10
    a[2].x = 20
    then i want to know how many itemss a got.. like count = a.itemcount() or count = a.listcount() then count should be 2 in this case.
    ???
    count = table.getn(a) will give you the number of entries in the table


 

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 .