This is a read-only archive of the old Scratch 1.x Forums.
Try searching the current Scratch discussion forums.

#1 2013-04-20 06:54:11

devone
Scratcher
Registered: 2013-03-19
Posts: 13

collision/touching bug

made my second game today but encountered a problem

http://scratch.mit.edu/projects/devone/3277826

*

i wanted to make a "game over" screen, so to do this i added a score variable,
but i dont know how to check if the score is 4 to proceed.

*

also when i drag the yellow shapes to the black cutout ones i got to be careful not to collide with any other shape

for example if i drag the yellow triangle to the black triangle and dont let go of my mouse but continue on to drop it on a wrong shape then it`ll say correct and dissapear

Offline

 

#2 2013-04-20 06:57:59

devone
Scratcher
Registered: 2013-03-19
Posts: 13

Re: collision/touching bug

maybe the second issue aint as bad as i make it out to be.... the goodjob and incorrect messages take 2 seconds to dissapear so partly to blame perhaps

eitherway would still like to know how to add a game over/complete screen

Offline

 

#3 2013-04-20 07:05:50

EH7meow
Scratcher
Registered: 2013-03-23
Posts: 24

Re: collision/touching bug

What you need to do is:

when gf clicked
forever
if <(Score)=[4]>
switch to background [next background]

Last edited by EH7meow (2013-04-23 13:27:21)


Love lovehearts? Love mending lovehearts? Then you'll love Love Doctor

Offline

 

#4 2013-04-20 07:42:02

devone
Scratcher
Registered: 2013-03-19
Posts: 13

Re: collision/touching bug

ah i see now, i needed the = operator

Offline

 

#5 2013-04-29 19:01:06

admad10
Scratcher
Registered: 2013-04-04
Posts: 8

Re: collision/touching bug

when gf clicked
if <[health v]>[10]=
say [game over!] for (5) secs
brodcast  [GAME OVER v]
end

Offline

 

Board footer