Heeeyy, i edited your code, and made it better, hope fully you will understand it, if not just ask.
`You can only swap 2 images with this code, you can make it more, but its good for now.
Sync On : Sync Rate 0
load image "ekintensiv.tga",1,1 `-- make sure you add the ,1 at the end of the command so it makes it look perfect, like how u made it, or got it. other wise it will look all fuzzy and it will loose alot of detail. :)
load image "ekvanlig.tga",2,1 `-- same here.
Do
cls `USE THIS!! it does the same thing as sync. but for 2D
If MouseX() >= 30 And MouseX() <= 30 + Image Width(1) `Image 1 || check collisions on the X axis.
If MouseY() >= 50 and MouseY() <= 50 + Image Height(1) `Image 1 || check collisions on the Y axis.
If MouseClick() = 1 `If mouseClick = 1
If Swap = 0 `And if Swap = 0 then swap = 1
While MouseClick() = 1 `Use this so that when u click, it waits for u to let go of the mouse button to continue, other wise it might screw up. (hard to explain in text)
EndWhile
Swap = 1
Endif
Endif
Endif
Endif
If MouseX() >= 30 And MouseX() <= 30 + Image Width(2) `Image 2 || check collisions on the X axis.
If MouseY() >= 50 and MouseY() <= 50 + Image Height(2) `Image 2 || check collisions on the Y axis.
If MouseClick() = 1 `If mouseClick = 1
If Swap = 1 `And if Swap = 1 then swap = 0 -- used to swap the image.
While MouseClick() = 1 `Use this so that when u click, it waits for u to let go of the mouse button to continue, other wise it might screw up. (hard to explain in text)
EndWhile
Swap = 0
Endif
Endif
Endif
Endif
Select Swap
Case 0 `check if the Swap variable = 0, then display image 1
Paste Image 1,30,50
Endcase
Case 1 `check if the Swap variable = 1, then display image 2
Paste Image 2,30,50
Endcase
EndSelect
Sync
Loop
