Page 4 of 7 FirstFirst 1234567 LastLast
Results 31 to 40 of 63

Thread: can somebody please tell me what I'm doing wrong with my lua script?

                  
   
  1. #31
    DCEmu Coder lmtlmt's Avatar
    Join Date
    Jan 2006
    Location
    Brisbane, Australia
    Posts
    1,755
    Rep Power
    92

    Default

    could somebody post i list of all the lua symbols you know

    ==
    =~

    and all thier meanings?

  2. #32
    DCEmu Old Pro M!ckeY's Avatar
    Join Date
    Mar 2006
    Age
    36
    Posts
    1,100
    Rep Power
    74

    Default

    you should try asking in the development area, you might get faster results there

  3. #33
    DCEmu Coder lmtlmt's Avatar
    Join Date
    Jan 2006
    Location
    Brisbane, Australia
    Posts
    1,755
    Rep Power
    92

    Default

    ok

  4. #34
    PSP Coder benh's Avatar
    Join Date
    Mar 2006
    Location
    linclonshire, England
    Posts
    362
    Rep Power
    71

    Default

    you may have a memory leak loading all those images
    Benh = Coder, main language C other language LUA

    Check out my first C app Super - flasher here

    visit my dev site where you can download all of my coding projects - http://benh-pspdev.bravehost.com/



    Please visit my site www.pspfanatic.bravehost.com
    and join the forums

  5. #35
    DCEmu Coder lmtlmt's Avatar
    Join Date
    Jan 2006
    Location
    Brisbane, Australia
    Posts
    1,755
    Rep Power
    92

    Default

    what does that mean

  6. #36
    DCEmu Coder lmtlmt's Avatar
    Join Date
    Jan 2006
    Location
    Brisbane, Australia
    Posts
    1,755
    Rep Power
    92

    Default

    in the game it now loads the background the deck and sets the life points to 4000!.

    ths is the script

    green = Color.new(0, 255, 0)
    blue = Color.new(0, 128, 255)
    luaLogo = Image.load("deck.jpg")
    background = Image.load("YUGI BACKGROUND2.png")
    lifepoints = (4000)

    function scaleImage(newX, newY, theImage)

    resizedImage = Image.createEmpty(newX, newY)
    for x = 1, newX do
    for y = 1, newY do
    resizedImage:blit(x,y , theImage,
    math.floor(x*(theImage:width()/newX)),math.floor(y*(theImage:height()/newY)), 1,
    1)
    end
    end
    return resizedImage

    end

    scaleImage(53,70, luaLogo) -- Resize image.

    while true do
    screen:blit(0, 0, background, false)
    screen:blit(2,173, resizedImage) -- Show the resized image
    screen:print(10, 11, "player 1 its your turn", green)
    screen:print(410, 14, lifepoints, blue)

    screen.flip()
    screen.waitVblankStart()

    end
    i am still trying to fugure out how to load all the images, some people have told me a few ways, but i still dont know which one to go for, i have had i lot of help from benj, so thnx for that

  7. #37
    DCEmu Newbie pspsk8r's Avatar
    Join Date
    Sep 2006
    Posts
    16
    Rep Power
    0

    Default

    whats a lua script?

  8. #38
    DCEmu Coder lmtlmt's Avatar
    Join Date
    Jan 2006
    Location
    Brisbane, Australia
    Posts
    1,755
    Rep Power
    92

    Default

    whats a lua script?
    it is a script for a game that you can play on your psp using lua player.

  9. #39
    DCEmu Coder lmtlmt's Avatar
    Join Date
    Jan 2006
    Location
    Brisbane, Australia
    Posts
    1,755
    Rep Power
    92

    Default

    i was trying to make the selecter move from one space to another by pressing left.
    it doesnt work. here is the script

    green = Color.new(0, 255, 0)
    blue = Color.new(0, 128, 255)
    luaLogo = Image.load("deck.jpg")
    background = Image.load("YUGI BACKGROUND2.png")
    lifepoints = (4000)
    selecter = Image.load("selecter.png")

    function scaleImage(newX, newY, theImage)

    resizedImage = Image.createEmpty(newX, newY)
    for x = 1, newX do
    for y = 1, newY do
    resizedImage:blit(x,y , theImage,
    math.floor(x*(theImage:width()/newX)),math.floor(y*(theImage:height()/newY)), 1,
    1)
    end
    end
    return resizedImage

    end

    scaleImage(53,70, luaLogo) -- Resize image.

    while true do
    pad = controls.read()
    screen:blit(0, 0, background, false)
    screen:blit(2,173, resizedImage) -- Show the resized image
    screen:print(10, 11, "player 1 its your turn", green)
    screen:print(410, 14, lifepoints, blue)
    screen:blit(384, 172, selecter)
    if pad:left() then
    selecter.x = selecter.x - 78

    screen.flip()
    screen.waitVblankStart()

    end
    any ideas on how to make it work

  10. #40
    DCEmu Coder lmtlmt's Avatar
    Join Date
    Jan 2006
    Location
    Brisbane, Australia
    Posts
    1,755
    Rep Power
    92

    Default

    can you assign images to tables? just wondering

Page 4 of 7 FirstFirst 1234567 LastLast

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •