Discuss Scratch
- Discussion Forums
- » Help with Scripts
- » I am trying to make the game end when my fish sprite touches anyone of the moving sprites, but it aint working.
        ![[RSS Feed] [RSS Feed]](//cdn.scratch.mit.edu/scratchr2/static/__5b3e40ec58a840b41702360e9891321b__//djangobb_forum/img/feed-icon-small.png)  
- zekesage
- 
                             New Scratcher New Scratcher
13 posts
I am trying to make the game end when my fish sprite touches anyone of the moving sprites, but it aint working.
https://scratch.mit.edu/projects/501664448/editor/
I have done what i can, but i still cant get the output needed
                        
                        
                    I have done what i can, but i still cant get the output needed
- Barthdry
- 
                             Scratcher Scratcher
500+ posts
I am trying to make the game end when my fish sprite touches anyone of the moving sprites, but it aint working.
You can try run without screen refresh and also i found a problem in one of your script block
                        
                        
                    - Cinderpelt9
- 
                             Scratcher Scratcher
75 posts
I am trying to make the game end when my fish sprite touches anyone of the moving sprites, but it aint working.
when green flag clicked
forever
if <<touching [Bear v] ?> or <touching [Bear2 v] ?>> then
stop [All v]
end
end
- deck26
- 
                             Scratcher Scratcher
1000+ posts
I am trying to make the game end when my fish sprite touches anyone of the moving sprites, but it aint working.
Look at your ball scripts.  The ball spends around 3 seconds in the ball_faster custom block before quickly checking if it is touching the ball - those scripts don't run at the same time, ball_faster has to complete before ball_end runs.  You probably want the touch detection to be in a separate script that is running at the same time rather than being called every few seconds.
DO NOT try running without screen refresh in a custom block that includes wait blocks!
                        
                            DO NOT try running without screen refresh in a custom block that includes wait blocks!
Last edited by deck26 (April 13, 2021 09:15:57)
- zekesage
- 
                             New Scratcher New Scratcher
13 posts
I am trying to make the game end when my fish sprite touches anyone of the moving sprites, but it aint working.
You can try run without screen refresh and also i found a problem in one of your script blockohh whats the problem?
- zekesage
- 
                             New Scratcher New Scratcher
13 posts
I am trying to make the game end when my fish sprite touches anyone of the moving sprites, but it aint working.
You can try run without screen refresh and also i found a problem in one of your script blockohh whats the problem?
- zekesage
- 
                             New Scratcher New Scratcher
13 posts
I am trying to make the game end when my fish sprite touches anyone of the moving sprites, but it aint working.
thanks guys! i finally solved it.  )
)
                        
                        
                     )
)- Discussion Forums
- » Help with Scripts
- 
            » I am trying to make the game end when my fish sprite touches anyone of the moving sprites, but it aint working. ![[RSS Feed] [RSS Feed]](//cdn.scratch.mit.edu/scratchr2/static/__5b3e40ec58a840b41702360e9891321b__//djangobb_forum/img/feed-icon-small.png)  
 
            ![[RSS Feed] [RSS Feed]](http://cdn.scratch.mit.edu/scratchr2/static/__5b3e40ec58a840b41702360e9891321b__//djangobb_forum/img/feed-icon-small.png)



