There are images on the screen that can be clicked on which makes them invisible, this works fairly well.
However, I've been trying to write some code to make the image disappear again if it isn't clicked on after a set time period.
This aspect is fairly crucial to the gameplay, otherwise the game becomes unbalanced and I have been stuck on this bit for a while. Any and all advice or guidance will be greatly appreciated.
Here's my code for the object;
Code: Select all
on mouseDown
add 20 to fld HitCount
set the visible of me to false
set the loc of me to random(700),random(400)
if the left of me <0 then set the left of me to 0
if the right of me >500 then set the right of me to 700
if the top of me <40 then set the top of me to 50
if the bottom of me >450 then set the bottom of me to 45
send "show_the_fish" to me in random(20) seconds
end mouseDown
Code: Select all
if the vis of "fish." = true
then wait 4 seconds with messages
then set the vis of me to false
then send "show_the_fish" to me in random(5) seconds
end if