i just made a button function:
function button(x, y, xsize, ysise, image_up, image_down, changing_var#, move, mousex, mousey,)
if mousex > x and mousex < x + xsize and mousey > y and mousey < y + ysize
paste image image_up, x, y
if mouseclick() = 1
paste image image_down, x, y
changing_var# = changing_var# + move
endif
else
paste image image_up, x, y
endif
endfunction
and this is how i call it:
button((buttonx - 32), (buttony - 16), 16, 16, 109, 110, camy#, 1, mousex(), mousey())
{buttonx = screen width() - 16 and buttony = screen height - 16)
ok, now to explain what's wrong:
i made this function from this code here:
if mousex() > buttonx - 32 and mousex() < buttonx - 16 and mousey() > buttony - 16 and mousey() < buttony
paste image 109, buttonx - 32, buttony - 16
if mouseclick() = 1
paste image 110, buttonx - 32, buttony - 16
dec camy#
endif
else
paste image 109, buttonx - 32, buttony - 16
endif
and that code works fine. but the function doesnt. it puts the image where i want it to be, but when i click on the image, it doesnt put the picture over it OR change camy#. anyone know whats wrong?