you should try asking in the development area, you might get faster results there![]()
could somebody post i list of all the lua symbols you know
==
=~
and all thier meanings?
you should try asking in the development area, you might get faster results there![]()
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
what does that mean
in the game it now loads the background the deck and sets the life points to 4000!.
ths is the script
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 thatgreen = 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
it is a script for a game that you can play on your psp using lua player.whats a lua script?
i was trying to make the selecter move from one space to another by pressing left.
it doesnt work. here is the script
any ideas on how to make it workgreen = 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
can you assign images to tables? just wondering
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks