Which bit exactly are you having problems with?Zitat:
Zitat von slicer4ever
Have you checked out the tutorials at www.evilmana.com
Printable View
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.