Seite 48 von 342 ErsteErste ... 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 98 148 ... LetzteLetzte
Zeige Ergebnis 1.411 bis 1.440 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; Pllease post you code...

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

    Pllease post you code




    PM me for a sig like this!

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

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

    Its good I messed around and fixed it but I get the [colo=Black]****ING LOOP IN GETTABLE NOW[/black] on the lines with "--Loop In gettable" next to em
    Code:
    black = Color.new(0,0,0)
    red = Color.new(255,0,0)
    
    stick = {}
    stick.x = 240
    stick.y = 200
    
    life = 1
    coll = 0
    y = 0 
    speed = 3
    
    spike = Image.load("spike.png")
    bg = Image.load("background.png")
    death = Image.load("death.png")
    stick = Image.load("stick.png")
     
    math.randomseed(os.time())
    
    x = math.random(480 - spike:height())
    
    while true do
    
    screen:clear()
    
    screen:blit(0, 0, bg, false)
    screen:blit(stick.x, stick.y, stick)    --Loop in gettable
    
    	pad = Controls.read()
    
    	screen:print(0, 240, "Speed: " .. speed, black)
    
    	screen:blit(x, y, spike)
    
    	if not paused then
    		screen:print(0, 250, "UNPAUSED", black)
    		y = y + speed
    
    		if y + spike:height() >= 272 then
    			screen:print(x, y - 10, "OUCH!", red)
    			y = 0
    			x = math.random(480 - spike:height())
    			screen.flip()
    			System.sleep(2000)
    		end
    	else
    		screen:print(0, 250, "PAUSED", red)
    	end
    
    	if pad:cross() and pad ~= oldpad then if paused then paused = false else 
    
    paused = true end end
    
    	if pad:up() and pad ~= oldpad then speed = speed + 1 end
    	if pad:down() and pad ~= oldpad then speed = speed - 1 end
    
    if pad:left() and pad ~= oldpad then      --Loop In gettable
    stick.x = stick.x - 2
    end
    
    if pad:right() and pad ~= oldpad then     -- Loop in gettable
    stick.x = stick.x + 2
    end
    
    oldpad = pad
    screen.flip()
    screen.waitVblankStart()
    
    end
    And the stick.x stuff has to be like that otherwise the player wont move
    Geändert von Mast3r_Shak3 (04-08-2006 um 07:29 AM Uhr)

    --XBL Gamertag: PhenoM904--

  3. #1413
    QJ Gamer Green
    Points: 6.520, Level: 52
    Level completed: 85%, Points required for next Level: 30
    Overall activity: 0%

    Registriert seit
    Nov 2005
    Ort
    Sweden
    Beiträge
    460
    Points
    6.520
    Level
    52
    Downloads
    0
    Uploads
    0

    Standard

    LUA PLAYER BUG?

    If you do like this:

    Code:
    if BGSoundTimer >= 1 then
    BGSound:play()
    BGSoundTimer = 0
    end
    It obviously plays the bgsound.

    But if you have any other sound that starts exactly when "BGSound" stops, then BGSound just stop looping, just stops.

    It drives me nuts, because i really want to finnish my game!
    [CENTER]Some of my homebrew Applications/Games:
    [URL=http://forums.qj.net/showthread.php?t=47294&page=1&pp=10]Planet Fighter[/URL] | [URL=http://forums.qj.net/showthread.php?p=641672#post641672]Graphic Creator (V2.0)[/URL] | [URL=http://forums.qj.net/showthread.php?p=512717]Fire Pong[/URL] | [B][URL="http://forums.qj.net/f-psp-development-forum-11/t-release-brushes-v20-99207.html#post1430891"][COLOR="Red"][SIZE="3"]Brushes v2.0[/COLOR][/SIZE][/B][/URL] [URL="http://forums.qj.net/f-psp-development-forum-11/t-release-brushes-v20-99207.html"][B][SIZE="2"][COLOR="Black"]Released![/COLOR][/SIZE][/B][/URL]
    [URL="http://haxxblaster.2u.se/"][COLOR="black"][FONT="Arial Black"]www.HaxxBlaster.com[/FONT][/COLOR][/URL]

    [URL="http://forums.qj.net/f-psp-development-forum-11/t-release-brushes-v20-99207.html"][IMG]http://img19.imageshack.us/img19/1346/brushesbannerqz3.png[/IMG][/URL][/CENTER]

  4. #1414
    Think, Do, Gloat.
    Points: 12.687, Level: 73
    Level completed: 60%, Points required for next Level: 163
    Overall activity: 0%

    Registriert seit
    Nov 2005
    Ort
    England, Norwich
    Beiträge
    1.422
    Points
    12.687
    Level
    73
    Downloads
    0
    Uploads
    0

    Standard

    Zitat Zitat von MaSt3r_ShAk3

    if pad:right() and pad ~= oldpad then -- Loop in gettable
    stick.x = stick.x + 2
    end


    end
    Why don't you use
    Code:
    if pad:right() and 
    oldpad:right() ~= pad:right() then    
    stick.x = stick.x + 2
    end
    That might fix the problem.

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

    i still get the error for the
    Code:
    screen:blit(stick.x, stick.y, stick)    --Loop in gettable

    --XBL Gamertag: PhenoM904--

  6. #1416
    QJ Gamer Blue
    Points: 5.333, Level: 46
    Level completed: 92%, Points required for next Level: 17
    Overall activity: 0%

    Registriert seit
    Apr 2006
    Beiträge
    109
    Points
    5.333
    Level
    46
    Downloads
    0
    Uploads
    0

    Standard

    i'm getting loop for gettable with...
    Code:
    monster = Sound.load("sounds/monsterkill.wav",false)
    voice = monster
    monster:stop() -- this gives loop gettable thing

  7. #1417
    QJ Gamer Silver
    Points: 8.201, Level: 61
    Level completed: 17%, Points required for next Level: 249
    Overall activity: 0%

    Registriert seit
    Oct 2005
    Ort
    Sheffield, UK
    Beiträge
    844
    Points
    8.201
    Level
    61
    Downloads
    0
    Uploads
    0

    Standard

    Zitat Zitat von Rixorster
    i'm getting loop for gettable with...
    Code:
    monster = Sound.load("sounds/monsterkill.wav",false)
    voice = monster
    monster:stop() -- this gives loop gettable thing
    luaplayer dosnt understand what monster means because monster is not a command.

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

    He assigned monster to the sound he loaded

    --XBL Gamertag: PhenoM904--

  9. #1419
    QJ Gamer Blue
    Points: 4.899, Level: 44
    Level completed: 75%, Points required for next Level: 51
    Overall activity: 0%

    Registriert seit
    Jun 2005
    Beiträge
    55
    Points
    4.899
    Level
    44
    Downloads
    0
    Uploads
    0

    Standard

    ok, this is getting annoying. i keep trying to make start resart the game im working on, nad every time i get

    no loop to break near end
    and my code is this

    if pad:start() then
    break
    end


    ive tried it withall versions .10 and up, and ive tried it with all buttons. plz help

    ps. does ne one know where to get lua player 0.09?

  10. #1420
    QJ Gamer Green
    Points: 6.520, Level: 52
    Level completed: 85%, Points required for next Level: 30
    Overall activity: 0%

    Registriert seit
    Nov 2005
    Ort
    Sweden
    Beiträge
    460
    Points
    6.520
    Level
    52
    Downloads
    0
    Uploads
    0

    Standard

    Zitat Zitat von qwerty
    ok, this is getting annoying. i keep trying to make start resart the game im working on, nad every time i get

    no loop to break near end
    and my code is this

    if pad:start() then
    break
    end


    ive tried it withall versions .10 and up, and ive tried it with all buttons. plz help

    ps. does ne one know where to get lua player 0.09?
    That's because there is no loop to break.
    i rather would use:

    Code:
    if pad:start() then
    dofile "index.lua"
    end
    To refresh the program, while creationg something in lua.
    Geändert von HaxxBlaster (04-08-2006 um 11:03 AM Uhr)
    [CENTER]Some of my homebrew Applications/Games:
    [URL=http://forums.qj.net/showthread.php?t=47294&page=1&pp=10]Planet Fighter[/URL] | [URL=http://forums.qj.net/showthread.php?p=641672#post641672]Graphic Creator (V2.0)[/URL] | [URL=http://forums.qj.net/showthread.php?p=512717]Fire Pong[/URL] | [B][URL="http://forums.qj.net/f-psp-development-forum-11/t-release-brushes-v20-99207.html#post1430891"][COLOR="Red"][SIZE="3"]Brushes v2.0[/COLOR][/SIZE][/B][/URL] [URL="http://forums.qj.net/f-psp-development-forum-11/t-release-brushes-v20-99207.html"][B][SIZE="2"][COLOR="Black"]Released![/COLOR][/SIZE][/B][/URL]
    [URL="http://haxxblaster.2u.se/"][COLOR="black"][FONT="Arial Black"]www.HaxxBlaster.com[/FONT][/COLOR][/URL]

    [URL="http://forums.qj.net/f-psp-development-forum-11/t-release-brushes-v20-99207.html"][IMG]http://img19.imageshack.us/img19/1346/brushesbannerqz3.png[/IMG][/URL][/CENTER]

  11. #1421
    Gutya
    Points: 15.093, Level: 79
    Level completed: 49%, Points required for next Level: 257
    Overall activity: 0%

    Registriert seit
    Feb 2006
    Beiträge
    2.398
    Points
    15.093
    Level
    79
    Downloads
    0
    Uploads
    0

    Standard

    Theres just something i need to clarify.

    If i do a dofile, does my application retain all the variables, arrays etc from the other file?
    D:

  12. #1422
    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 Gutya
    Theres just something i need to clarify.

    If i do a dofile, does my application retain all the variables, arrays etc from the other file?
    Yes it does.
    Zitat Zitat von Noriko
    I would call you gay but I love you.


    Wait ...huh.



  13. #1423
    Gutya
    Points: 15.093, Level: 79
    Level completed: 49%, Points required for next Level: 257
    Overall activity: 0%

    Registriert seit
    Feb 2006
    Beiträge
    2.398
    Points
    15.093
    Level
    79
    Downloads
    0
    Uploads
    0

    Standard

    Thanks mate.

    P.S. Haha, just noticed the sig.
    D:

  14. #1424
    QJ Gamer Silver
    Points: 7.109, Level: 55
    Level completed: 80%, Points required for next Level: 41
    Overall activity: 0%

    Registriert seit
    Jun 2005
    Ort
    Puerto Rico
    Beiträge
    310
    Points
    7.109
    Level
    55
    Downloads
    0
    Uploads
    0

    Standard

    Zitat Zitat von califrag
    you should just develop a code yourself so you can customize it the way you want...

    http://www.google.com/search?hl=en&l...th%27s+gravity

    http://www.evilmana.com/tutorials/lu...et_jumping.php

    but that should get you started! ;D
    thanks, I see what I can do.

  15. #1425
    Simon Champion!
    Points: 11.489, Level: 70
    Level completed: 60%, Points required for next Level: 161
    Overall activity: 99,0%

    Registriert seit
    Mar 2006
    Ort
    Calgary, Alberta, Ca
    Beiträge
    537
    Points
    11.489
    Level
    70
    Downloads
    0
    Uploads
    0

    Standard

    Zitat Zitat von califrag
    click "search this thread"
    I did. Nobobdy gave any examples lkike that.
    Games I Made:
    Stick Dance
    Stick Dance V2
    50% Done "Smile Quartet"


    MY XBOX.COM GAMER SPOTLIGHT!

  16. #1426
    Simon Champion!
    Points: 11.489, Level: 70
    Level completed: 60%, Points required for next Level: 161
    Overall activity: 99,0%

    Registriert seit
    Mar 2006
    Ort
    Calgary, Alberta, Ca
    Beiträge
    537
    Points
    11.489
    Level
    70
    Downloads
    0
    Uploads
    0

    Standard

    Nobody has been able to help me.....I am dissapointed in this thread....
    Games I Made:
    Stick Dance
    Stick Dance V2
    50% Done "Smile Quartet"


    MY XBOX.COM GAMER SPOTLIGHT!

  17. #1427
    QJ Gamer Bronze
    Points: 5.459, Level: 47
    Level completed: 55%, Points required for next Level: 91
    Overall activity: 0%

    Registriert seit
    Jul 2005
    Ort
    Washington
    Beiträge
    211
    Points
    5.459
    Level
    47
    Downloads
    0
    Uploads
    0

    Standard

    Hey, can someone help me with a couple of things?

    If someone were to make a game in lua, ex. a fighting game , how would one go on about it. I've read the tutorials provided by whitehawk, they've helped alot but im looking for something a bit more complicated. How would you make it so that when your press a button, such as X, an animation plays?

    something like this?

    if pad:cross then
    screen:blit(30, 120, punchR)
    screen.flip()
    end

    except the character is actually executing the animation so that the location is not needed but it is where the character is, how would I do that, make it so that the character image changes to the animation, at his position? Then back?

    Also How would you make your character move at a constant rate when you hold down a button and stop when you release? Would you have a command that if the button is pressed the character moves X amount of pixels right or left ect, depending on the button and then it stops when the button is released? If so, what is the command?

    Finally how would you make it so that when an animation is played, if the opposing character is in range (right next to you) that the animation changes from just playing the animation but to another one where the opposing character is hit and his life goes down, an if command? If character is in range, play animation punchedR new line health - 20?

    Thanks for your help

    Andrey

    Edit: One last thing, how would you make that if you have an image (background) and your moving in it, when you reach the end of the screen it keeps moving. Like a long image horizantle that you keep moving through then at the end when you touch a certain object it takes you to the next image, (background/level).
    Geändert von Andrey (04-08-2006 um 10:04 PM Uhr)
    Psp firmware: 1.5 - Thank you 0okm and Fanjita! ^^

  18. #1428
    SHOOP DA WHOOP
    Points: 12.310, Level: 72
    Level completed: 65%, Points required for next Level: 140
    Overall activity: 99,7%

    Registriert seit
    Aug 2005
    Ort
    Wii forums
    Beiträge
    7.407
    Points
    12.310
    Level
    72
    Downloads
    0
    Uploads
    0

    Standard

    how would you do a sidescrolling screen? such as when your sprite reaches the end of the screen (or the middle) it scrolls with him

  19. #1429
    Simon Champion!
    Points: 11.489, Level: 70
    Level completed: 60%, Points required for next Level: 161
    Overall activity: 99,0%

    Registriert seit
    Mar 2006
    Ort
    Calgary, Alberta, Ca
    Beiträge
    537
    Points
    11.489
    Level
    70
    Downloads
    0
    Uploads
    0

    Standard

    Zitat Zitat von Andrey
    Hey, can someone help me with a couple of things?

    If someone were to make a game in lua, ex. a fighting game , how would one go on about it. I've read the tutorials provided by whitehawk, they've helped alot but im looking for something a bit more complicated. How would you make it so that when your press a button, such as X, an animation plays?

    something like this?

    if pad:cross then
    screen:blit(30, 120, punchR)
    screen.flip()
    end

    except the character is actually executing the animation so that the location is not needed but it is where the character is, how would I do that, make it so that the character image changes to the animation, at his position? Then back?

    Also How would you make your character move at a constant rate when you hold down a button and stop when you release? Would you have a command that if the button is pressed the character moves X amount of pixels right or left ect, depending on the button and then it stops when the button is released? If so, what is the command?

    Finally how would you make it so that when an animation is played, if the opposing character is in range (right next to you) that the animation changes from just playing the animation but to another one where the opposing character is hit and his life goes down, an if command? If character is in range, play animation punchedR new line health - 20?

    Thanks for your help

    Andrey

    Edit: One last thing, how would you make that if you have an image (background) and your moving in it, when you reach the end of the screen it keeps moving. Like a long image horizantle that you keep moving through then at the end when you touch a certain object it takes you to the next image, (background/level).
    I would also like to know EVERYTHING you just said.
    Games I Made:
    Stick Dance
    Stick Dance V2
    50% Done "Smile Quartet"


    MY XBOX.COM GAMER SPOTLIGHT!

  20. #1430
    QJ Gamer Blue
    Points: 5.333, Level: 46
    Level completed: 92%, Points required for next Level: 17
    Overall activity: 0%

    Registriert seit
    Apr 2006
    Beiträge
    109
    Points
    5.333
    Level
    46
    Downloads
    0
    Uploads
    0

    Standard

    Zitat Zitat von mannymix03
    how would you do a sidescrolling screen? such as when your sprite reaches the end of the screen (or the middle) it scrolls with him
    I found this in teh internet :P
    Code:
    --load the images
    
    layer = {
    buffer = Image.createEmpty(480, 272)
    }
    slicesize=500
    slices = {
    Image.load("slice1.png"), --500x272px
    Image.load("slice2.png"), --500x272px
    Image.load("slice3.png") --500x272px --images are at his site
    }
    
    -- 0..1500
    shade = {
    start=0,
    ende=480
    }
    drawslices = 0
    
    function limited(val)
    val = math.ceil(val/501)
    if val>table.getn(slices) or val==0 then
    return 1
    end
    return val
    end
    
    
    -- correct this value
    while not Controls.read():start() do
    shade.ende = shade.ende+1
    shade.start = shade.start+1
    if shade.ende>=1500 then
    shade.ende=0
    end
    if shade.start>=1500 then
    shade.start=0
    end
    --move the background to left
    
    layer.buffer:clear()
    drawslices = slicesize-math.mod(shade.start,slic esize+1)
    layer.buffer:blit(0,0,sli ces[limited(shade.start)],math.mod(shade.start,sli cesize+1),0,drawslices,27 2)
    layer.buffer:blit(drawsli ces,0,slices[limited(shade.ende)],0,0,math.mod(shade.ende, slicesize+1),272)
    layer.buffer:print(25, 100,shade.start ,Color.new(255,0,46))
    layer.buffer:print(25, 110,shade.ende ,Color.new(255,0,46))
    -- update screen
    screen:blit(0,0,layer.buf fer)
    screen.flip()
    end

  21. #1431
    QJ Gamer Bronze
    Points: 5.459, Level: 47
    Level completed: 55%, Points required for next Level: 91
    Overall activity: 0%

    Registriert seit
    Jul 2005
    Ort
    Washington
    Beiträge
    211
    Points
    5.459
    Level
    47
    Downloads
    0
    Uploads
    0

    Standard

    For those interested more in lua, here is a tutorial which i think covers animation. Its http://wiki.ps2dev.org/psp:lua_player:tutorial it starts out with the hello world but talks about animation and a couple of other things, hope ya find what you need.

    Going to read it now
    Psp firmware: 1.5 - Thank you 0okm and Fanjita! ^^

  22. #1432
    QJ Gamer Bronze
    Points: 8.803, Level: 63
    Level completed: 18%, Points required for next Level: 247
    Overall activity: 0%

    Registriert seit
    Jan 2006
    Ort
    Western Australia
    Beiträge
    1.046
    Points
    8.803
    Level
    63
    Downloads
    0
    Uploads
    0

    Standard

    Hey people, I jsut wanted to ask if anyone knew why some music in a gmae like BME would be disorted? It honestly is totally screwed, only plays a deep sound.

  23. #1433
    QJ Gamer Platinum
    Points: 87.718, Level: 100
    Level completed: 0%, Points required for next Level: 0
    Overall activity: 100,0%
    Awards:
    Activity Award

    Registriert seit
    Jan 2006
    Ort
    stevens bumhole
    Beiträge
    10.308
    Points
    87.718
    Level
    100
    Downloads
    0
    Uploads
    0

    Standard

    how do i do to make a game compatible with the analog stick?? please help!

  24. #1434
    QJ Gamer Bronze
    Points: 8.803, Level: 63
    Level completed: 18%, Points required for next Level: 247
    Overall activity: 0%

    Registriert seit
    Jan 2006
    Ort
    Western Australia
    Beiträge
    1.046
    Points
    8.803
    Level
    63
    Downloads
    0
    Uploads
    0

    Standard

    Look at PSPGuitar, it uses analog stick.

  25. #1435
    <img src="images/smilies/psp.gif" border="0" alt="" title="" cl***="inlineimg" /> <img src="images/smilies/Punk.gif" border="0" alt="" title="" 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 madsoul
    how do i do to make a game compatible with the analog stick?? please help!
    I learned to do analog controls from this post,,

    Zitat Zitat von monster356
    I have been working with a movement script for my game, analog doesn't move make my character move in all directions, only left, right, up and down. how do i make it so moves anyway i push that analog?

    here is my coding:

    Code:
    System.usbDiskModeActivate()
    
    sprite = Image.load("jet2.png")
    menubg = Image.load("menubg.png")
    red = Color.new(255, 0, 0)
    black = Color.new(0, 0, 0)
    
    -- Players current X coord 
    pcXpos = 30
    -- Players current Y coord 
    pcYpos = 115 
    -- Show the X/Y coords to adjust the movement #'s 
    screen:print(0, 0, tostring(pcXpos), red) 
    screen:print(0, 0, tostring(pcYpos), red) 
    
    function updateMove(xPos, yPos) 
    --{ 
       analogPad = Controls.read() 
       dx = analogPad:analogX() 
       dy = analogPad:analogY() 
    -- Up 
       if dx > -60 and dx < 40 and dy == -128  or analogPad:up() then 
          pcYpos = pcYpos - 4 
          playerDirection = "up" 
       end 
    -- Left 
       if dy > -25 and dy < 40 and dx == -128 or analogPad:left() then 
          pcXpos = pcXpos - 4
          playerDirection = "left" 
    
    
       end 
    -- Down 
       if dx > -40 and dx < 40 and dy == 127 or analogPad:down() then 
          pcYpos = pcYpos + 4
          playerDirection = "down" 
       end 
    -- Right 
       if dy > -35 and dy < 45 and dx == 127 or analogPad:right() then 
          pcXpos = pcXpos + 4
          playerDirection = "right" 
       end 
    
          -- Check to see if player is off screen
       if pcXpos >= 431 then -- Subtract sprite width
          pcXpos = 430
       elseif pcXpos < 0 then
          pcXpos = 00
       end
       if pcYpos >= 234 then -- Subtract sprite height
          pcYpos = 232
       elseif pcYpos < 0 then
          pcYpos = 00
       end 
    --} 
    end 
    
    
    while true do
    
       screen:clear(black)
       updateMove()
       screen:blit(0, 0, menubg)
       screen:blit(pcXpos, pcYpos, sprite) 
    
       pad = Controls.read() 
       if pad:start() then break end 
    
       screen.waitVblankStart()
       screen.flip()
    
    end

  26. #1436
    words are stones in my <3
    Points: 35.274, Level: 100
    Level completed: 0%, Points required for next Level: 0
    Overall activity: 0%

    Registriert seit
    Jul 2005
    Ort
    Spokane
    Beiträge
    5.008
    Points
    35.274
    Level
    100
    My Mood
    Lonely
    Downloads
    1
    Uploads
    0

    Standard

    Zitat Zitat von Rixorster
    I found this in teh internet :P
    Code:
    --load the images
    
    layer = {
    buffer = Image.createEmpty(480, 272)
    }
    slicesize=500
    slices = {
    Image.load("slice1.png"), --500x272px
    Image.load("slice2.png"), --500x272px
    Image.load("slice3.png") --500x272px --images are at his site
    }
    
    -- 0..1500
    shade = {
    start=0,
    ende=480
    }
    drawslices = 0
    
    function limited(val)
    val = math.ceil(val/501)
    if val>table.getn(slices) or val==0 then
    return 1
    end
    return val
    end
    
    
    -- correct this value
    while not Controls.read():start() do
    shade.ende = shade.ende+1
    shade.start = shade.start+1
    if shade.ende>=1500 then
    shade.ende=0
    end
    if shade.start>=1500 then
    shade.start=0
    end
    --move the background to left
    
    layer.buffer:clear()
    drawslices = slicesize-math.mod(shade.start,slic esize+1)
    layer.buffer:blit(0,0,sli ces[limited(shade.start)],math.mod(shade.start,sli cesize+1),0,drawslices,27 2)
    layer.buffer:blit(drawsli ces,0,slices[limited(shade.ende)],0,0,math.mod(shade.ende, slicesize+1),272)
    layer.buffer:print(25, 100,shade.start ,Color.new(255,0,46))
    layer.buffer:print(25, 110,shade.ende ,Color.new(255,0,46))
    -- update screen
    screen:blit(0,0,layer.buf fer)
    screen.flip()
    end
    1. Thats Lumo's scrolling example, so i ask you, whyd you edit out his name and comments at the very top huh?
    2. That is a very good scrolling example except copying and pasting doesnt help you. You wont learn anything, nor if someone hoping to learn from your code will either, that is why its fairly important youeither make it yourself, or fully comment that scrolling example.

    My opinion ^

    EDIT

    Oh and FLai, you just spammed again, nice work! WWAAYY off topicc, and no use, should have PMd me, not post it here to get 1 + post count... Your on a roll today!! w00t w00t, tread cautiously
    Geändert von SG57 (04-09-2006 um 10:23 AM Uhr)

    ...at what speed must I live.. to be able to see you again?...

    Projects

    You can support my Open World 3D RPG for PSP by voting for it here


  27. #1437
    QJ Gamer Blue
    Points: 5.333, Level: 46
    Level completed: 92%, Points required for next Level: 17
    Overall activity: 0%

    Registriert seit
    Apr 2006
    Beiträge
    109
    Points
    5.333
    Level
    46
    Downloads
    0
    Uploads
    0

    Standard

    SG57, i found it in psplua.com, don't blame me <.< there were no credits there o_o

  28. #1438
    Gutya
    Points: 15.093, Level: 79
    Level completed: 49%, Points required for next Level: 257
    Overall activity: 0%

    Registriert seit
    Feb 2006
    Beiträge
    2.398
    Points
    15.093
    Level
    79
    Downloads
    0
    Uploads
    0

    Standard

    Is there like a basic quit command?

    Like

    if bla then
    quit
    end

    what can i use?
    D:

  29. #1439
    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 Gutya
    Is there like a basic quit command?

    Like

    if bla then
    quit
    end

    what can i use?
    "break" is the basic quit command. It should break the loop and bring you back to lowser. So for example:
    Code:
     if pad:start() then
    break
    end
    Zitat Zitat von Noriko
    I would call you gay but I love you.


    Wait ...huh.



  30. #1440
    Gutya
    Points: 15.093, Level: 79
    Level completed: 49%, Points required for next Level: 257
    Overall activity: 0%

    Registriert seit
    Feb 2006
    Beiträge
    2.398
    Points
    15.093
    Level
    79
    Downloads
    0
    Uploads
    0

    Standard

    What if your not loading it in Lowser? What if its with an eboot?

    And also i tried that, but it doesnt seem to work in a function.
    D:


 

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 .