oh sorry it didnt work because i didnt change it from
card.png to SDY-001.jpg
I'll try it again
Here, uase tables:
card_1 = {
Image.load("card1.png"),
Image.load("card2.png"),
Image.load("card3.png"),
Image.load("card4.png"),
Image.load("card5.png"),
Image.load("card6.png"),
Image.load("card7.png"),
Image.load("card8.png"),
}
This is a more suitable way to upload images. Less memory leaks![]()
Miniviews:
Spoiler!
oh sorry it didnt work because i didnt change it from
card.png to SDY-001.jpg
I'll try it again
Thats for loading the into animation i beleive...
This would be for images I think
Cards = { }
card[1] =Image.load("card.png")
card[2] = Image.load("card3.png")
card[3] = Image.load("card4.png")
card[4] = Image.load("card5.png")
card[5] = Image.load("card6.png")
Im not what you'd call experiance, so maybe check with zion or yaustar first.
Miniviews:
Spoiler!
nope stilll didnt work
thanx for trying
I'll figure out somethin. In the meantime, why not join the evilmana forums for advice.
Miniviews:
Spoiler!
i tried to register but it kept sayingin the part how you have to write what it says RU5SD, that thingtext written is not the same as shown
The first suggestion shoulda worked...
Miniviews:
Spoiler!
Here is your mistake:Originally Posted by lmtlmt
Here you attempt to create an entry in a table on a variable that is not a table. Also there is no end for your if statement.screen:blit(384, 172, selecter)
if pad:left() then
selecter.x = selecter.x - 78
Try this:
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.
selectorX = 384
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(selectorX, 172, selecter)
if pad:left() then
selectorX = selectorX - 78
end
screen.flip()
screen.waitVblankStart()
endhttp://lua-users.org/wiki/ExpressionsTutorialOriginally Posted by lmtlmt
thanx yaustar, but it doesnt work
That doesn't tell me much. WHAT doesn't work.Originally Posted by lmtlmt
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks