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

#1 2011-01-01 09:40:32

yoan
New Scratcher
Registered: 2011-01-01
Posts: 1

When Touching not working

I am having an issue using when touching sprite decrement counter by 1. However, its not happening that way. Here is some of my blocks. If its just me being dumb please school me on where I'm going wrong.

<when[ start ]key pressed>
<forever>
<go to x sad  <pick random(-240  )to(  240)y:(180 )
<hide>
<wait(2  )secsc>
<show>
<glide( 6 )secs to x sad  <pick random( -240 )to( 240 )y sad  -200)
<if><touching[ sprite2]
<change{ lives }by(-1)
end if
end forever

I have three sprites with the same blocks and the variable never decrements when they touch sprite2. Any ideas or suggestions? Thanks.

Offline

 

#2 2011-01-01 22:47:12

-iNetMaster-
Scratcher
Registered: 2010-08-30
Posts: 1000+

Re: When Touching not working

Try this:
Take out the if.
Make a new script:
When flag clicked forever put the if from the first script in there.
Iis it working?

Offline

 

#3 2011-01-02 00:00:36

Jonathanpb
Scratcher
Registered: 2008-07-25
Posts: 1000+

Re: When Touching not working

Could you upload your unfinished project so we could take a look? It's a bit hard to help when we can't see it  tongue


"Human beings... must have action; and they will make it if they cannot find it.
-Charlotte Brontë

Offline

 

Board footer