No, the filenames are correct, I'm sure about that, because, otherwise, it wouldn't load on the PSP too, would it?
And as soon as I convert the pictures to png files, they won't work at all, not at the psp, nor at the box.
Printable View
No, the filenames are correct, I'm sure about that, because, otherwise, it wouldn't load on the PSP too, would it?
And as soon as I convert the pictures to png files, they won't work at all, not at the psp, nor at the box.
And you're sure you changed the code so it know it is a png file
Zitat:
Zitat von SjaakRake
I guess that you got a to old luaplayer to load .jpg files.
Get the newest version at: http://luaplayer.org
Make also sure that your extention in the string is the same as the file you are loading.
Yes, totally sure. I get the following errors:
On psp:
*something* IDAT: CRC Error.
After which luaplayer shuts off
And on the computer I get the same 'Error loading image' error.
Your first picture works, then the other picture don't when you load it, and you don't have written the wrong namne.
Then i guess that the file don't even exist.
Yes, it does exist. I just don't get it. It seems like something is ****ing up all my .png files.
If you add me to msn: [email protected] il.com i will have a look over for you.
Thanks, done, I'll stop chatting now in this topic now ^_^.
Zitat:
Zitat von califrag
dude, u REALLY want above and beyond the call of duty. thx so much! if i were premium, id give u all my points(which is not that much) :D :D :D :D
thx again!
i think you guys may have missed my question can some1 help me out?Zitat:
Zitat von slicer4ever
Which bit exactly are you having problems with?Zitat:
Zitat von slicer4ever
Have you checked out the tutorials at www.evilmana.com
i need the line of duplicating my thing to happen with more than one person if youve played aotm then you know that the angry faces fire bullets at the same time so can someone help me with makeing it fire with more then one person
Erm, You would put create the image 4 times in different positions, tell it to randomly move the images, put a timer in. Then you tell it them to fire in random directions, or the same? I don't know how yuo woulld go about it, but that's how i assume. I know what you mean though with AOTM. good game.
well i guess i'll have to do it that way then(sighs)
hi all, im havin another prob.:(
here is my code:
itworks, but the value of caseValue[1], instead of being random, just goes higher all the time. the values of caseValue[2] and caseValue[20] work fine. when. caseValue[1] goes over 1000000, luaplayer give me an error: index.lua:33: bad argument #2 to 'print' (string expected, got nil)Code:white = Color.new(0, 0, 0)
System.usbDiskModeActivate()
screen:clear()
caseMoney = { 100000, 750000, 500000, 400000, 300000, 200000, 100000, 50000, 25000, 10000, 50000, 1000, 750, 500, 400, 300, 200, 100, 75, 50, 25, 10, 5, 1, .01 }
math.randomseed(os.time())
math.random()
math.random()
math.random()
function startNewGame()
caseValue = { caseMoney[math.random(26)], caseMoney[math.random(26)], caseMoney[math.random(26)], caseMoney[math.random(26)], caseMoney[math.random(26)], caseMoney[math.random(26)], caseMoney[math.random(26)], caseMoney[math.random(26)], caseMoney[math.random(26)], caseMoney[math.random(26)], caseMoney[math.random(26)], caseMoney[math.random(26)], caseMoney[math.random(26)], caseMoney[math.random(26)], caseMoney[math.random(26)], caseMoney[math.random(26)], caseMoney[math.random(26)], caseMoney[math.random(26)], caseMoney[math.random(26)], caseMoney[math.random(26)], caseMoney[math.random(26)], caseMoney[math.random(26)], caseMoney[math.random(26)], caseMoney[math.random(26)], caseMoney[math.random(26)], caseMoney[math.random(26)] }
end
startNewGame()
while true do
pad = Controls.read()
screen:print(150, 100, caseValue[1], white)
screen:print(150, 140, caseValue[2], white)
screen:print(150, 180, caseValue[20], white)
if pad:start() then
break
end
screen.flip()
screen.waitVblankStart()
end
press start to restart
pls help. thx
EDIT: how can i make it so that the maht.random(26) doesnt take the same value twice??
I need some help... I got some music files to loop forever and it works, the only problem is that I can run it along side my game. Ill post the code for the music, but not the code ( as it is HUGE )
Song Code:
Code:Song = {}
Song[1] = ("Songs/Why.it")
Song[2] = ("Songs/monopoly2.it")
Song[3] = ("Songs/compare1.it")
pad = Controls.read()
for i=1, 9999 do
if i==1 then Music.playFile(Song[i])
Music.volume(128)
screen.waitVblankStart(9540)
i=i+1
end
if i==2 then Music.playFile(Song[i])
Music.volume(128)
screen.waitVblankStart(11460)
i=i+1
end
if i==3 then Music.playFile(Song[i])
Music.volume(128)
screen.waitVblankStart(13500)
i=i-2
end
end
Zitat:
Zitat von Grimfate126
hmmm... basically you took the code I gave you... deconstructed it... and made it do exactly what you don't want it to do...
You should try using my code again.. it does exactly what you want...
no, this for another game. ;) (same names, but im change it later, im lazy)Zitat:
Zitat von califrag
and BTW about ur code, can u make it possible to assign EACH case a different money amount, the code u gave me only does it for ur case. thx(again)
I don't know where else to ask this.
When running lua programs, how do I quit them? Get out of them back to the Lua loader screen.
Surely there has to be a way to do this. So far I've run quite a few, but have been unable to quit any of them.
well normally its the start button or select.
So what exactly is your problem? That you cant run it along side your game? Also i dont understand your code. You make it loop 9999 times eventhough there are only three songs. And you make them play right aftereachother. And also you pause the game while you play your music. So i assume this is the begin screen where you show who made it and stuff?Zitat:
Zitat von cools
I've encountered a little problem. As you can see in my code, I want the 'highlight.png' image to slide or hop to the left and right by using the left and right buttons. The only problem is, I only want the picture to go to the next 'state' upon pressing the key, but not sliding. So if I press the button once, I want it to go shift 10 pixxels, and when I press it again, it has to do another step.
Thanks in advanceCode:highlight = Image.load("images/highlight.png")
background = Image.load("images/background.png")
x = 4
y = 87
while true do
screen:blit(0, 0, background, 0, 0, background:width(), background:height(), false)
screen:blit(x,y,highlight,0,0, highlight:width(), highlight:height(), true)
screen.waitVblankStart()
screen.flip()
pad = Controls.read()
if pad:right() then
x = x + 10
elseif pad:left() then
x = x - 10
end
end
You're not telling the image to move, you're just telling to make x a bigger number...
I'm not quite sure how you would put it though...
Actually, the picture does move, hence the line:
screen:blit(x,y,highlight ,0,0, highlight:width(), highlight:height(), true)
first eliminate the screen wait vblanks start and put that at the end preceeded by a screen flip, then put oldpad = controls.read just after your pad = controls.read thing
say something like this:
while true do
screen:blit(0, 0, background, 0, 0, background:width(), background:height(), false)
screen:blit(x,y,highlight ,0,0, highlight:width(), highlight:height(), true)
screen.flip()
pad = Controls.read()
oldpad = Controls.read()
if pad:right() and pad ~= oldpad then
x = x + 10
oldpad = pad
elseif pad:left() and pad ~= oldpad then
x = x - 10
oldpad = pad
end
screen.waitVblankStart()
screen.flip()
end
Hmm, that one doesn't seem to work. It's doesn't shift and the screen flashes like a madman. I guess the pad and oldpad variables are colliding.
The songs play right after each other without the loop. The loop is there so the songs will play [one after another] 9999 times ( so for a long time ). There is no need to have it pause in game, it needs to be playing as soon as the game starts, but not in the menus.Zitat:
Zitat von Altair
or if you find a button you don't have to use and youve tried everything to quit do this:
go into the script and put the following code at the bottom before the last end:
if pad:triangle() then break
end
thats it although if it isn't triangle then heres all the buttons possible:
pad:cross()
pad:triangle()
pad:circle()
pad:square()
pad:r()
pad:l()
pad:left()
pad:right()
pad:up()
pad:down()
i believe thats all of them
edit: opps on last page was answering discofever's question
get rid of the first screen.flip(), so its like this:
screen:blit(0, 0, background, 0, 0, background:width(), background:height(), false)
screen:blit(x,y,highlight ,0,0, highlight:width(), highlight:height(), true)
pad = Controls.read()
oldpad = Controls.read()
if pad:right() and pad ~= oldpad then
x = x + 10
oldpad = pad
elseif pad:left() and pad ~= oldpad then
x = x - 10
oldpad = pad
end
screen.waitVblankStart()
screen.flip()
end
NVRMIND but at line 30 i get that retarded "loop in gettable' error. This is the line of the error.Code:if stick.x>480 then
i think it should either beZitat:
Zitat von MaSt3r_ShAk3
orCode:if life == 0 then
Code:if life = 0 then
put another = sign with the = so
if life==0 then
Yeah nvrmind i edited the post with my new error that is EVILLLL
Zitat:
Zitat von MaSt3r_ShAk3
try wit spacesCode:if stick.x > 480 then
No dice...
black = Color.new(0, 0, 0)
life = 1
coll = 0
stick = Image.load("stick.png")
spike = Image.load("spike.png")
background = Image.load("background.pn g")
death = Image.load("death.png")
player = {}
player[1] = { x=240, y=200, life=1, stick=player[1] }
Okay look at the bold parts. is this possible? this might be the cause of my problems
No that is not possible. You say that player[1].stick=player[1]. You cant assign something to itself.
Ok i understand, but again, what exactly is your problem? I just dont get your post where you state your problem. Because i think you left out a "t" after the "can", or am i wrong? Please say it again. (maybe im just being really stupid :o )Zitat:
Zitat von cools
Sorry, I forgot to mention it...
Well whenever i try to play that along the with the game, it only plays the music and doesnt let you play the game.
It will play along side game if i only tell it to playback one of the music files.
I was told to do this buit it says the waitVblank thibg is wrong. help pleaseCode:frame_1 = Image.load("frame_1.png")
frame_2 = Image.load("frame_2.png")
frame_3 = Image.load("frame_3.png")
screen:clear()
while (true) do
--Put image to memory and flip it to screen
screen:blit(0, 0, frame_1)
screen.flip()
--Keep frame showing for 8 milliseconds
screen.WaitVblankStart(8)
--Clear screen to start over
screen:clear()
screen:blit(0, 0, frame_2)
screen.flip()
screen.WaitVblankStart(8)
screen:clear()
screen:blit(0, 0, frame_3)
screen.flip()
screen.WaitVblankStart(8)
screen:clear()
end
can you have functions within functions?