Close but no cigar yet...Zitat:
Zitat von Floppydrive
Give that a whirl...Code:while true do
pad = Controls.read()
if pad:cross() then
screen:print(10,10,"TEST TEST TEST", Color.new(255,0,0))
screen.waitVblankStart()
screen.flip()
end
Printable View
Close but no cigar yet...Zitat:
Zitat von Floppydrive
Give that a whirl...Code:while true do
pad = Controls.read()
if pad:cross() then
screen:print(10,10,"TEST TEST TEST", Color.new(255,0,0))
screen.waitVblankStart()
screen.flip()
end
If I do what you said SG57, with the screen.waitVblankStart() and screen.flip() under the pad:cross(), it flickers when I hold X, and doesn't stay there when I press it. :(
Then you probably have a screen.flip() somewhere in your code (probably near the end) and it's reflipping it. Try taking out the screen.flip() in SG57's code and see what happens.Zitat:
Zitat von PSPduh
If i try the above code then it stays there when I HOLD X, and just appears then disappears if i press it. :Argh: :( :Argh: :( :Argh: :( :Argh: :(Code:black = Color.new(0, 0, 0)
white = Color.new(255, 255, 255)
grey = Color.new(127,127,127)
red = Color.new(255, 0, 0)
green = Color.new(0, 255, 0)
blue = Color.new(0, 0, 255)
yellow = Color.new(255,255,0)
purple = Color.new(120,0,120)
pink = Color.new(255,0,255)
orange = Color.new(255,110,0)
ms = 0
x = 0
while true do
screen:clear(black)
pad = Controls.read()
if pad:up() then
ms = ms - 1
screen.waitVblankStart(4)
end
if pad:down() then
ms = ms + 1
screen.waitVblankStart(4)
end
if pad:cross() then
screen:print(10,10,"DUHDUHDUH", white)
screen.waitVblankStart()
end
screen.waitVblankStart()
screen.flip()
end
that what you're looking for?Code:if pad:cross() then
if duh == false then
duh = true
elseif duh == true then
duh = false
end
end
if duh == true then
screen:print(10,10,"DUHDUHDUH", white)
end
YEs that what I was looking for. Thanks. :):):):):):):):):):):):): ):):):):):):):):):)Zitat:
Zitat von EminentJonFrost
im trying to get a wav to play with my menu and put it as a varible like all my other sounds and my other sounds work fine but this wav file wont work when i try to load my game on the windows LUA Player the dos box sais error loading sound and crashes so why is it having an error with this wav file but none of my other wav files? is it because the wav it too big of a size or what? the one im trying to play now is 30mb
www.evilmana.com/tutorialsZitat:
Zitat von Goldrush
Okay... I'm a little confused right now (I'm about to fall asleep on my keyboard). Well anyway, I have created an empty image that is 480x272. I want to store my two background images in there so it only blits what is shown on screen. Can anybody show me how to do this? I think I would get it if I had a good night's sleep.
Thanks,
ShockD
Is there any way to make an action ocur only if a certian two buttons are pressed at the same time? Thank you for your time :icon_smil