ya, but could you overwrite current files?
Printable View
ya, but could you overwrite current files?
Does anyone know how to make a sidescroller? do you need one giant image and use code to make it scroll once a unit enters a area. Does anyone have the code to do this or a example game in lua? Help would be apreciated.
22
not now...atleast, probably not now, since lua is still very basicZitat:
Zitat von TeamOverload
Zitat:
Zitat von JOVENASO
Code:pad = Controls.read()
if pad:square() and pad:circle() then
break
end
ok, thanks. this is a great thread, you get answers very quickly. this should be stickiedZitat:
Zitat von Jeremy1026
I really couldn't say...Zitat:
Zitat von TeamOverload
Would that work?Zitat:
Zitat von whitehawk
both pad and Controls.read() only can have one value, so wouldn't this work better?
Code:while true do
pad1 = Controls.read()
pad2 = Controls.read()
if pad1:square() then
if pad2:circle() then
break
end
end
end
No one's helping me :(
Right..
I've got two folders
psp/game/nameofgame/
nameofgame%/
why is it that if I change either of the names of these folders my script stops working?
Or.. am I just being stupid?
I am trying to make a coin flipping program, you press X and it will display an message, heads, or with tails. Here is as far as the display part goes.
Something is wrong with the part under the if pad.Code:pad = Controls.read()
screen:print(120, 15, "Welcome to my coin toss game!", blue)
screen:print(60, 190, "Press X to Flip Coin!", yellow)
screen.flip()
if pad:cross() and (math.random(1,2) < 2) then
while true do
screen:clear()
screen:blit(0, 0, bg, false)
screen:print(120, 15, "Welcome to my coin toss game!", blue)
screen:print(160, 30, "Created By Jesse", red)
screen:print(60, 190, "Press X to Flip Coin!", yellow)
screen.flip()
screen:print(60, 160, "Coin Flipped! Heads!", yellow)
while true do
screen.flip()
elseif pad:cross() and (math.random(1,2) > 1) then
screen:clear()
screen:blit(0, 0, bg, false)
screen:print(120, 15, "Welcome to my coin toss game!", blue)
screen:print(160, 30, "Created By Jesse", red)
screen:print(60, 190, "Press X to Flip Coin!", yellow)
screen.flip()
screen:print(60,160, "Coin Flipped! Tails!", yellow)
screen.flip()
end[
Shouldnt your if's be
"if (pad:cross()) and (math.random(1,2) < 2) then"
both statements either side of the 'and' have to be in ( )'s
..... ?