Code: Select all
if pointer_x >= 0 and pointer_x <= 98 and pointer_y >= 245 and pointer_y <= 272 and pad:cross() then
screen:blit(0,245,startpushed)
end
Moderators: Shine, Insert_witty_name
Code: Select all
if pointer_x >= 0 and pointer_x <= 98 and pointer_y >= 245 and pointer_y <= 272 and pad:cross() then
screen:blit(0,245,startpushed)
end
Code: Select all
if pointer_x >= 0 and pointer_x <= 98 and pointer_y >= 245 and pointer_y <= 272 and pad:cross() then
showImage = 1
end
if pad:square() then
showImage = 0
end
if showImage > 0 then
screen:blit(0,245,startpushed)
end
OH THANK GOD!! IT WORKS!!!!! I just hate being a noob though, now to figure out how to make it work with one button instead of 2 >_<.Dr. Vegetable wrote:Well, my knowledge of Lua is pretty skimpy, but usually what you need to do in a situation like this is to create a "flag" variable that indicates whether the image should be displayed, and then set or reset that flag based on the appropriate events. You didn't specify the circumstances under which the image should go away, but (for example) you could have it stay until you press the square by doing something like:
This is untested code, but should give you some idea of how to proceed. Hope this helps!Code: Select all
if pointer_x >= 0 and pointer_x <= 98 and pointer_y >= 245 and pointer_y <= 272 and pad:cross() then showImage = 1 end if pad:square() then showImage = 0 end if showImage > 0 then screen:blit(0,245,startpushed) end