oh ok, i was just checkingZitat:
Zitat von Virtue
what if i wanted all way directional movement?
would i have to keep adding if statements?
Printable View
oh ok, i was just checkingZitat:
Zitat von Virtue
what if i wanted all way directional movement?
would i have to keep adding if statements?
new question!
well, how would i make a projectile(an arrow) spawn from my character when i press X? it only goes in one direction too, just if you wanted to know
okay, i did this
musicbg = Sound.load("music.wav")
musicbg:play()
Music.volume(128)
but is doesnt work!
Also, what monster said, i would like to know that too!
Okay, how do I make it so that when I press for exampel the X button on a small picture of a circle then the picture changes to a cross? =)
I have an error string 6 on my user lua for 2.0. It also says there is an unexpected symbol, even after I installed the patch. Could this be because I put the new Pspmillionaire in the applications folder?
Know what I mean?
For Monsters thing, you just blit an image a little bit to the right of the characters x posistion, and then add a x = x + 3 or something to the bullets x posistion, so it will increase and go to the right.
can someone help me it keeps saying its running the script but nuttin comes up
i am using lua the latest lua
heres my code
Zitat:
System.usbDiskModeActivat e()
blue=Color.new(0,0,255)
oldinput = Controls.read()
input = Controls.read()
screen:clear()
gun1=Image.load("pics/gun1.png")
gun2=Image.load("pics/gun2.png")
gun3=Image.load("pics/gun3.png")
gun4=Image.load("pics/gun4.png")
gun5=Image.load("pics/gun5.png")
gun6=Image.load("pics/gun6.png")
gun7=Image.load("pics/gun7.png")
gun8=Image.load("pics/gun8.png")
gun9=Image.load("pics/gun9.png")
gun10=Image.load("pics/gun10.png")
gun11=Image.load("pics/gun11.png")
gun12=Image.load("pics/gun12.png")
gun13=Image.load("pics/gun13.png")
gun14=Image.load("pics/gun14.png")
gun15=Image.load("pics/gun15.png")
gun16=Image.load("pics/gun16.png")
gunlist = {gun1, gun2, gun3, gun4, gun5, gun6, gun7, gun8, gun9, gun10, gun11, gun12, gun13, gun14, gun15, gun16}
listpos = 1
function readinput()
input = Controls.read()
if input:oldinput() then
if input:left() and listpos > 1 then
listpos = listpos - 1
end
if input:right() and listpos < table.getn(gunlist) then
listpos = listpos + 1
end
oldinput = input
end
function drawgun()
screen:blit(0,0,gunlist[listpos])
screen.flip()
end
while not input:start() do
read:input()
drawgun()
screen.waitVblankStart()
screen:clear()
end
end
if that doesn't work i'll let you knowZitat:
Zitat von Virtue
EDIT: this is my code:
there is something wrong with it, when i press X it shows my missle like pratically offscreen, it just appears over there
Code:if pad:cross() then
bombX = pcXpos
bombY = pcYpos
while bombX < 480 do
screen:clear(black)
screen:blit(0, 0, menubg)
screen:blit(pcXpos, pcYpos, sprite)
screen:print(0, 20, tostring(dx), red) --analog coords
screen:print(20, 20, tostring(dy), red) --analog coords
screen:blit(bombX, bombY, missile)
bombX = bombX + 5 --Controls missile speed
end
end
Edit - NevermindZitat:
Zitat von slicer4ever